TPDFlibCertificateInfo
Data Types, security and signatures
Description
TPDFlibCertificateInfo is a record returned by EnumCertificates that describes one certificate found in a Windows certificate store. Each entry reports the subject and issuer distinguished names, validity window, whether a private key is available for signing, whether the certificate is eIDAS-qualified, and the raw PCCERT_CONTEXT handle
Syntax
Delphi
type TPDFlibCertificateInfo = record
Subject: WideString;
Issuer: WideString;
SerialNumber: WideString;
NotBefore: TDateTime;
NotAfter: TDateTime;
ValidNow: Boolean;
HasPrivateKey: Boolean;
Qualified: Boolean;
CertHandle: Pointer;
end;Fields
| Subject | The subject distinguished name of the certificate |
|---|---|
| Issuer | The issuer distinguished name of the certificate |
| SerialNumber | The hexadecimal serial number of the certificate |
| NotBefore | The local start of the validity period |
| NotAfter | The local end of the validity period |
| ValidNow | True when the current date falls within the validity window |
| HasPrivateKey | True when the certificate has an associated private key, which is required for signing |
| Qualified | True when the certificate carries the eIDAS QCStatements extension (OID 0.4.0.1862.1.7) |
| CertHandle | The raw PCCERT_CONTEXT for use with SetSignProcessCertFromStoreByHandle; the store owns it until CertCloseStore is called |
Remarks
The certificate store owns the CertHandle; do not close it yourself while the enumeration result is in use
Only certificates with HasPrivateKey set to true can be used as the signer for a signature
See also
EnumCertificates, CreateSelfSignedCertificate, NewSignProcessFromFile