AddPAdESDSSCertificate

Security and Signatures

Requires the Enterprise edition — in Delphi, C++Builder and Lazarus code create the library as TPDFlibEnterprise (unit PDFlibEnterprise); the Enterprise DLL and ActiveX builds provide it unchanged; other editions keep the method, which returns 0, an empty string or False and sets LastErrorCode to 900 (PDFLIB_ERROR_ENTERPRISE_REQUIRED)

Description

Stages a single DER-encoded X.509 certificate (RFC 5280) for inclusion in the DSS /Certs array. Call repeatedly to add multiple certificates from the validation chain

Syntax

Delphi

Function TPDFlib.AddPAdESDSSCertificate(DSSProcessID: Integer; Const CertDER: AnsiString): Integer; Virtual;

ActiveX

Function PDFlib::AddPAdESDSSCertificate(DSSProcessID As Long, CertDER As Variant) As Long

DLL

int DLAddPAdESDSSCertificate(int InstanceID, int DSSProcessID, const char* CertDER, int CertDERLength);

Parameters

DSSProcessIDValue returned by one of the NewPAdESDSSProcessFrom* functions
CertDERDER-encoded X.509 certificate bytes

Return values

1 when the certificate has been staged, or 0 when the process ID is invalid or the bytes are not one complete DER-encoded SEQUENCE (an empty string is rejected)