org.bouncycastle.cms.CMSSignedData(contents) fails with:
IOException reading content.
org.bouncycastle.cms.CMSException: IOException reading content.
at org.bouncycastle.cms.CMSUtils.readContentInfo(Unknown Source)
at org.bouncycastle.cms.CMSSignedData.<init>(Unknown Source)
at BouncyCastle185RegressionTest.PDF signature contains padded CMS(BouncyCastle185RegressionTest.kt:33)
Caused by: java.io.IOException: Extra data detected in stream
at org.bouncycastle.asn1.ASN1Primitive.fromByteArray(Unknown Source)
... 3 more
in BouncyCastle 1.85 if contents is padded with extra data (zeros). This worked in BouncyCastle 1.84
I'm not sure if this was intentional or not.
Code attached.
CMSSignedDataIssue.tar.gz
org.bouncycastle.cms.CMSSignedData(contents)fails with:in BouncyCastle 1.85 if contents is padded with extra data (zeros). This worked in BouncyCastle 1.84
I'm not sure if this was intentional or not.
Code attached.
CMSSignedDataIssue.tar.gz