-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
encoding/asn1: support decoding BER-encoded messages (e.g. PKCS7) #12267
Comments
CL https://golang.org/cl/13746 mentions this issue. |
encoding/asn1's design hasn't worked out too well and I don't think that BER support would be suitable. |
I'm aware of at least three other libraries that need to support BER encoding. Two of them ends up ~reimplementing all of asn1 (without nicer tagging/unmarshaling support), and the other tries to convert BER to DER but does it wrong. Afaict they could use golang's asn1 if it supported indefinite-length encodings. The change to implement this is relatively small, and would help reduce the proliferation of buggy implementations. |
David, since this issue was closed, what did you end up doing for PKCS 7 and BER instead? |
I ended up writing a "BER-to-DER" converter, which I'd like to open-source, but haven't had a chance to yet. |
There's a couple blockers to being able to parse a BER-encoded PKCS7 message:
The text was updated successfully, but these errors were encountered: