-
Notifications
You must be signed in to change notification settings - Fork 785
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
forge.pkcs7.messageFromPem stop working since 1.3.0 version #975
Comments
Can you provide an example PEM file? As you read in the changelog, there were changes to make things more strict to address some other serious vulnerabilities. Perhaps there were some unintended side effects for reasonable use cases. If you have an example with valid data that is failing, we'd like to see that so it can be fixed. There are flags to |
Well, I extracted it from pdf signed with acrobat reader. I put an example:
|
Thanks. 2647 bytes of data and 896 trailing zeros. Looking at the PEM RFC 7468, I see the contents are BER, not DER, so things like trailing useless data are, I think, acceptable. I'm guessing that's for some sort of padding, who knows. They do have an appendix that basically says to use DER, which I suppose most tools do. So I'm guessing everywhere the code calls I'll make a patch soon and try to address this for all the related cases. |
Patch available in #977. Still pondering if that's the best approach. Will release something soon. |
Thanks, I really appreciate your help. |
I'm encountering this error when parsing receipts from Apple's App Attest service. |
@davidlehn run into this parsing problem, when parsing padded DER data from a smart cards EF.ATR file which looked like this:
Adding One minor issue in typescript though: |
I was using this function to decode a pem of pkcs#7, but from 1.3.0 version it's returning:
Unparsed DER bytes remain after ASN.1 parsing.
Best regards,
The text was updated successfully, but these errors were encountered: