Ignore missing PKCS#9 signing time field (NID_pkcs9_signingTime: 1.2.840.113549.1.9.5) in the CMS_ContentInfo structure.

Timestamping time for verification is get from embedded content in this CMS_ContentInfo structure.
This commit is contained in:
olszomal 2024-03-08 09:00:24 +01:00 committed by Michał Trojnara
parent c73f82b558
commit 71a046a2d0

View File

@ -2167,8 +2167,6 @@ static int print_cms_timestamp(CMS_ContentInfo *timestamp, time_t time)
/* PKCS#9 signing time - Policy OID: 1.2.840.113549.1.9.5 */ /* PKCS#9 signing time - Policy OID: 1.2.840.113549.1.9.5 */
attr = CMS_signed_get_attr(si, CMS_signed_get_attr_by_NID(si, NID_pkcs9_signingTime, -1)); attr = CMS_signed_get_attr(si, CMS_signed_get_attr_by_NID(si, NID_pkcs9_signingTime, -1));
if (attr == NULL)
return 0; /* FAILED */
printf("\tSigning time: "); printf("\tSigning time: ");
print_time_t(time_t_get_asn1_time(X509_ATTRIBUTE_get0_data(attr, 0, V_ASN1_UTCTIME, NULL))); print_time_t(time_t_get_asn1_time(X509_ATTRIBUTE_get0_data(attr, 0, V_ASN1_UTCTIME, NULL)));