PLSplitCertificateBundle

Cryptography, digital signatures

Description

Splits a concatenated DER certificate bundle into the first certificate and the remaining certificates

Syntax

Delphi

Function PLSplitCertificateBundle(Const CertificateBundleDER: AnsiString;
  Out LeafDER, ExtraCertsDER: AnsiString): Boolean;

Parameters

CertificateBundleDEROne or more DER certificates concatenated back to back
LeafDERReceives the first certificate in the bundle
ExtraCertsDERReceives the concatenation of all remaining certificates; empty when the bundle holds a single certificate

Return values

TrueAt least one certificate was split off
FalseThe input is empty or does not start with a DER SEQUENCE

Remarks

Call repeatedly on ExtraCertsDER to walk the whole chain

Signers consume bundles from PFX containers where the leaf ordering is not guaranteed; this helper separates the signer certificate from issuer material

See also

PLCertificatePublicKeyInfo, PLValidateBrainpoolIdentity, PLBuildModernDetachedCMS