PLVerifyCertificatePathPure

Cryptography, digital signatures

Description

Builds and verifies a certificate path entirely in pure Pascal, from a leaf certificate through a pool toward trusted anchors

Syntax

Delphi

Function PLVerifyCertificatePathPure(Const CertificateDER: AnsiString;
  Const Pool, Anchors, CRLs: Array Of AnsiString;
  VerificationTime: TDateTime; CheckRevocation: Boolean;
  Out Path: TPLCertificatePath; Out Status: Integer): Boolean;

Parameters

CertificateDERDER-encoded leaf certificate to validate
PoolCandidate intermediate certificates, concatenated DER entries
AnchorsTrusted self-signed anchor certificates
CRLsComplete CRLs consulted when CheckRevocation is set
VerificationTimeThe validity point for period checks
CheckRevocationValidates each certificate against the supplied CRLs
PathReceives the assembled chain on success
StatusReceives a detailed failure code when the path does not verify

Return values

TrueA path to an anchor was built with every signature, validity period, CA flag, key usage and path length constraint verified
FalseNo valid path exists; Status carries the failure reason

Every intermediate signature, validity period at VerificationTime and CA basic-constraints flag is verified; revocation checking consumes complete CRLs only

Key usage and path length follow RFC 5280: an issuer that carries a keyUsage extension must assert keyCertSign, no more intermediates may follow an issuer than its pathLenConstraint allows, and a signer certificate that carries keyUsage must assert digitalSignature or nonRepudiation. A certificate without a keyUsage extension is not restricted, and a CA certificate verified on its own is not treated as a signer certificate. Extended key usage is not evaluated

Status is one of PL_PATH_TRUSTED (0), PL_PATH_NO_ANCHOR (1), PL_PATH_BAD_SIGNATURE (2), PL_PATH_EXPIRED (3), PL_PATH_NOT_CA (4), PL_PATH_REVOKED (5), PL_PATH_REVOCATION_UNKNOWN (6), PL_PATH_MALFORMED (7), PL_PATH_KEY_USAGE (8) or PL_PATH_PATH_LENGTH (9)

Used by the native AdES verdicts alongside PLSigningCertificateAttributeStatus

See also

PLSigningCertificateAttributeStatus, PLVerifyModernDetachedCMS, PLSplitCertificateBundle