AddTrustAnchorFromFile

Security and signatures

Requires the Enterprise edition — part of the Enterprise signature verification surface in TPDFlibSignatureVerifier (unit PDFlibEntSignVerify)

Description

Reads a certificate file and adds it to the custom trust-anchor set by delegating the parsed bytes to AddTrustAnchorDER.

The whole file is treated as one DER certificate; no PEM or multi-certificate container handling takes place here.

Syntax

Delphi

Function TPDFlibSignatureVerifier.AddTrustAnchorFromFile(Const CertificateFile: WideString): Boolean;

Parameters

CertificateFilePath of a DER-encoded X.509 certificate file

Return values

TrueThe file was loaded and the certificate is in the anchor set, either newly added or already present
FalseThe file is missing, cannot be opened or read, is empty or too large, or its bytes do not decode as an X.509 certificate

Remarks

The file is opened read-only with share-deny-write; any open or read failure simply yields False.

See also

TPDFlibSignatureVerifier, TPDFlibEUTSLTrustSource, NativeCRLRevocation