PLCertificateSubjectAndIssuer

Cryptography, digital signatures

Description

Extracts the DER-encoded subject and issuer names from a certificate

Both outputs are the complete Name SEQUENCE encodings, not string forms, so they can be compared byte-for-byte for the seed-value issuer matching that qualified certificates demand

Syntax

Delphi

Function PLCertificateSubjectAndIssuer(Const CertificateDER: AnsiString;
  Out SubjectDER, IssuerDER: AnsiString): Boolean;

Parameters

CertificateDERDER-encoded certificate to parse
SubjectDERReceives the subject Name SEQUENCE, empty on failure
IssuerDERReceives the issuer Name SEQUENCE, empty on failure

Return values

FalseThe certificate structure could not be walked to the subject or issuer
TrueBoth DER name encodings were extracted

Remarks

Used by the signing stack to embed and match signing-certificate references, and by PLVerifyModernDetachedCMS to locate the signer certificate data

See also

PLBuildModernDetachedCMS, PLVerifyModernDetachedCMS, PLModernCertificateKeyAlgorithm