Uh oh!
There was an error while loading. Please reload this page.
CmsSignedData: Don't assume the signed content is a Asn1OctetString object - #63
CmsSignedData: Don't assume the signed content is a Asn1OctetString object#63qmfrederik wants to merge 2 commits into
Conversation
peterdettman
commented
Jun 24, 2016
The proposed change would change (break) the behaviour when the signed content is an Asn1OctetString, since GetOctets is not the same as GetEncoded. The BC Java version has extra code to allow a sequence to be handled here, which would be reasonably straightforward to port over, but it is not quite as simple as calling GetEncoded on the sequence (in fact it appears to just encode the elements of the sequence). So I doubt if the proposed change is correct for sequences either. It would be helpful if you could give more information on what type of files you are trying to work with, and if you know it, the relevant applicable RFC or other standards document that we could refer to. |
qmfrederik
commented
Jun 24, 2016
Thanks for the feedback! The files I'm working with are security catalogs for drivers ( As far as I understand, RFC 2315 section 5 does not place any restriction on the content:
(The Java branch seems to refer to this content as "PKCS#7 ANY"). And hence, Microsoft defined the Certificate Trust List with OID I've amended the PR to be backward compatibility. Let me know if you require additional information from my side! |
nmoinvaz
commented
Sep 12, 2016
I think RFC 5652 section 5.2.1, Compatibility with PKCS #7, applies here as well:
|
Genbox
commented
Oct 16, 2016
Authenticode signed files are PKCS#7 and not CMS, which will result in BC breaking inside CmsSignedDataParser. BC Java Beta (156b03) have implemented PKCS#7 support, which should solve this. |
peterdettman
commented
May 15, 2025
I think this was addressed by 2a508f3 . |
This PR fixes an issue in the
CmsSignedDatawhere the constructor would assume that the signed content is anAsn1OctetStringobject. That's not always true - in my case, the data was aDerSequence.