BuildPAdESSignatureTimeStampAttribute

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 an empty string and sets LastErrorCode to 900 (PDFLIB_ERROR_ENTERPRISE_REQUIRED)

Description

Wraps a DER-encoded RFC 3161 TimeStampToken in a CMS id-aa-signatureTimeStampToken Attribute sequence

This stateless helper is an advanced escape hatch for callers that deliberately rebuild CMS themselves

For the normal PAdES-B-T workflow, use SetPAdESSignatureTimeStampToken so token validation, existing-attribute replacement, DER sorting, and nested length rebuilding remain inside the library

Syntax

Delphi

Function TPDFlib.BuildPAdESSignatureTimeStampAttribute(
  Const TimeStampTokenDER: AnsiString): AnsiString; Virtual;

DLL

const char* DLBuildPAdESSignatureTimeStampAttribute(int InstanceID, const char* TimeStampTokenDER, int TimeStampTokenDERLength, int* ByteCount);

ActiveX

Function PDFlib::BuildPAdESSignatureTimeStampAttribute(TimeStampTokenDER As Variant) As Variant

Parameters

TimeStampTokenDERDER-encoded RFC 3161 TimeStampToken returned by the TSA

Return values

The DER-encoded CMS Attribute sequence, or an empty string for empty token input

See also

SetPAdESSignatureTimeStampToken, SetPAdESSignatureCMSBytes