Skip to content
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

Closed
dtbartle opened this issue Aug 21, 2015 · 6 comments
Closed

encoding/asn1: support decoding BER-encoded messages (e.g. PKCS7) #12267

dtbartle opened this issue Aug 21, 2015 · 6 comments
Milestone

Comments

@dtbartle
Copy link

@dtbartle dtbartle commented Aug 21, 2015

There's a couple blockers to being able to parse a BER-encoded PKCS7 message:

  1. Support indefinite-length encoding.
  2. Support "ANY DEFINED BY".
@dtbartle dtbartle changed the title encoding/asn1 should support decoding BER-encoded messages (e.g. PKCS7) encoding/asn1: support decoding BER-encoded messages (e.g. PKCS7) Aug 21, 2015
@gopherbot
Copy link

@gopherbot gopherbot commented Aug 22, 2015

CL https://golang.org/cl/13746 mentions this issue.

@mikioh
Copy link
Contributor

@mikioh mikioh commented Aug 22, 2015

/CC @agl

Also please take a look at #8860 and #10621.

@agl
Copy link
Contributor

@agl agl commented Aug 22, 2015

encoding/asn1's design hasn't worked out too well and I don't think that BER support would be suitable.

@agl agl closed this Aug 22, 2015
@dtbartle
Copy link
Author

@dtbartle dtbartle commented Aug 22, 2015

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.

@mikioh mikioh added this to the Unplanned milestone Aug 23, 2015
@nathany
Copy link
Contributor

@nathany nathany commented Feb 3, 2016

David, since this issue was closed, what did you end up doing for PKCS 7 and BER instead?

@dtbartle
Copy link
Author

@dtbartle dtbartle commented Feb 4, 2016

I ended up writing a "BER-to-DER" converter, which I'd like to open-source, but haven't had a chance to yet.

@golang golang locked and limited conversation to collaborators Feb 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.