-
Notifications
You must be signed in to change notification settings - Fork 18k
crypto/asn1: ASN.1 Marshal with application tag #18873
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
I will let @agl decide what to do here. I think he may no longer be accepting changes to this package. The right answer may be for somebody to start maintaining a fork of the asn1 package outside of the Go tree. |
I'm not adverse to this since I think the complexity cost would probably be quite small. (Brad is correct that, in general however, I regret the design of |
Can I send a CL? func MarshalWithParams(val interface{}, params string) ([]byte, error) |
@hirochachacha, feel free to send one so we know what it looks like. |
@bradfitz Thanks. I'll think about it. |
I found an another issue #20488. |
CL https://golang.org/cl/44111 mentions this issue. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.6.2 linux/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/go-1.6"
GOTOOLDIR="/usr/lib/go-1.6/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
What did you do?
Not an error. I want marshal/unmarshal ASN.1 where the first byte is defined as an application tag, e.g. 0x60. However this is not possible because the encoding/asn1/Marshal function does not allow for the parameters to be configured.
I suggest adding a function "MarshalWithParameters" that allows for some of the parameters to be configured, such as setting the tag to
asn1:"application"
or adopting a solution similar to the xml encoding XMLName type that augments a given structure with meta data for the encoding.The text was updated successfully, but these errors were encountered: