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/pem: pem.Decode accepts PEM with trailing data #19147

Closed
joeshaw opened this issue Feb 17, 2017 · 2 comments
Closed

encoding/pem: pem.Decode accepts PEM with trailing data #19147

joeshaw opened this issue Feb 17, 2017 · 2 comments

Comments

@joeshaw
Copy link
Contributor

joeshaw commented Feb 17, 2017

If PEM data passed to pem.Decode() includes data after the -----END FOO----- trailer on the same line, it quietly ignores it.

The fix for the related #16335 took care of too few dashes and of the type not matching, but did not handle extra trailing data (like an extra dash). OpenSSL's PEM library refuses to open this data.

@gopherbot
Copy link

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

@odeke-em
Copy link
Member

From the discussion in #7042 (comment), seems like fixing this issue will fix that issue too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants