PLSigningCertificateAttributeStatus
Cryptography, digital signatures
Description
Checks the ESS signing-certificate or signing-certificate-v2 attribute of one CMS signer against the signer certificate
Syntax
Delphi
Function PLSigningCertificateAttributeStatus(Const CMSBytes: AnsiString;
SignerIndex: Integer): Integer;Parameters
| CMSBytes | DER-encoded SignedData structure |
|---|---|
| SignerIndex | Zero-based signer to inspect |
Return values
| 0 | Neither signing-certificate v2 nor v1 is present in the signed attributes |
|---|---|
| 1 | The attribute is present and its ESSCertID hash matches the signer certificate |
| 2 | The attribute is present but the certificate hash does not match |
| 3 | The CMS, signed-attributes set or attribute encoding could not be parsed |
Signing-certificate-v2 is preferred when both forms are present; the hash algorithm is taken from the attribute, defaulting to SHA-256
AdES verification uses this check to confirm the signature really commits to the certificate that made it
See also
PLVerifyModernDetachedCMS, PLVerifyCertificatePathPure, PLCertificateSubjectAndIssuer