I’m encountering an issue while verifying a TSD (Timestamped Digital Signature) file named nameFile.pdf.tsd using the DSS (Digital Signature Service) library version 5.13.
I previously encountered similar problems with M7M files, but I resolved them by using BouncyCastle directly and then passing the resulting object to DSS.
Despite trying to verify the file directly with BouncyCastle, I’m still facing the following exception:
org.bouncycastle.cms.CMSException: Malformed content.
at org.bouncycastle.cms.CMSUtils.readContentInfo(Unknown Source)
at org.bouncycastle.cms.CMSUtils.readContentInfo(Unknown Source)
at org.bouncycastle.cms.CMSSignedData.<init>(Unknown Source)
at it.infocamere.test.dss.main.DssMain.main(DssMain.java:164)
Caused by: java.lang.IllegalArgumentException: unknown object in getInstance: org.bouncycastle.asn1.DLTaggedObject
at org.bouncycastle.asn1.ASN1Sequence.getInstance(Unknown Source)
at org.bouncycastle.asn1.cms.ContentInfo.getInstance(Unknown Source)
... 4 more
It seems that DSS may not be well-suited for handling timestamps, and might be more effective with signatures.
Could you please assist me with the TSD issue? Alternatively, can you suggest a library that might be more suitable for TSD verification than DSS?
Rony Robin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.