PLSignerInfoSigningCertificateStatus

Cryptography, digital signatures

Description

Checks the ESS signing-certificate or signing-certificate-v2 attribute of one DER-encoded CMS SignerInfo structure against a signer certificate

The check works on the SignerInfo alone, so it applies to any content type of the CMS message and to both forms of signer identifier. PLSigningCertificateAttributeStatus takes a complete SignedData structure instead

Syntax

Delphi

Function PLSignerInfoSigningCertificateStatus(Const SignerInfoDER,
  CertificateDER: AnsiString): Integer;

Parameters

SignerInfoDERDER-encoded SignerInfo structure with its signed attributes
CertificateDERDER-encoded certificate that is compared with the first certificate hash of the attribute

Return values

0The SignerInfo has no signed attributes, or neither signing-certificate v2 nor v1 is present in them
1The attribute is present and its first certificate hash matches the certificate
2The attribute is present but the certificate hash does not match
3The SignerInfo or the attribute could not be read, the hash algorithm of the attribute is not supported, or the certificate is empty although the attribute is present

Remarks

Signing-certificate-v2 is preferred when both forms are present. Version 2 takes the hash algorithm from the attribute and defaults to SHA-256; version 1 always uses SHA-1

The signature verifier uses the result to make sure that a signature or time-stamp token commits to the certificate that produced it

See also

PLSigningCertificateAttributeStatus, PLVerifyModernDetachedCMS, PLVerifyCertificatePathPure