Generate valid CMS Signature file adding external PKCS#1 with Java
问题 I'm generating CMS signature files with external PKCS#1 based on this thread. The first step is obtain the signed attributes from the original file to be signed in external application which is returning PKCS#1 byte array. Then build standard org.bouncycastle.cms.SignerInfoGenerator with original file hash, signed data (PKCS#1) and certificate to add to CMS, and finally create the attached signature . But when i'd tried to validate it using this code: String originalFile =