-
Notifications
You must be signed in to change notification settings - Fork 18.1k
proposal: encoding/asn1: support for generalstring by struct tag #18832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The current implementation cannot marshal a string into asn1 general string encoded bytes. This capability has been added. Fixes golang#18832
The current implementation cannot marshal a string into asn1 general string encoded bytes. This capability has been added. Fixes golang#18832
Change https://golang.org/cl/134223 mentions this issue: |
/cc @FiloSottile |
I wanted to revive this issue as a proposal, would it be better to open a new issue or can we reuse this one? I believe the suggestion is pretty straightforward - add a new struct tag to the |
CC @golang/security |
Uh oh!
There was an error while loading. Please reload this page.
What version of Go are you using (
go version
)?go version go1.7.5 linux/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GORACE=""
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build372878858=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1
The issue
Using "encoding/asn1" it is not possible to marshal into a an asn1 general string. It is possible to unmarshal from one but it is only possible to marshal into one of ia5, printable or utf8.
https://play.golang.org/p/cwv9ZGV5K5
Suggestion
There should be an struct tag such as "generalstring" that works in the same way as the "ia5" tag but sets the asn1 tag value of 27.
The text was updated successfully, but these errors were encountered: