Add Signing Time to PKCS7 Signed CMS?
问题 I'm trying to add the signing time attribute to a file that I am signing using SignedCMS. private byte[] signFile(byte[] fileContent, X509Certificate2 verificationCert) { ContentInfo contentInfo = new ContentInfo(fileContent); SignedCms signedCMS = new SignedCms(contentInfo); CmsSigner cmsSigner = new CmsSigner(SubjectIdentifierType.IssuerAndSerialNumber, verificationCert); Oid signedDate = new Oid("1.2.840.113549.1.9.5"); //oid for PKCS #9 signing time signedDate.Value = DateTime.Now