VerifyDocumentTimeStampExByName

Security and signatures

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

Description

Validates the RFC 3161 document timestamp carried by the named signature field against the signature ByteRange data.

The field must exist and its SubFilter must be ETSI.RFC3161, otherwise the call returns vsUnknown. The ByteRange must validate, otherwise the call returns vsInvalid.

The overall result is vsValid only when the token signature, the message imprint over the signed bytes, the TSA extended key usage and name binding, the expected policy and nonce, and the TSA certificate chain all pass; TPDFlibTimeStampVerificationReport reports each of these independently.

Syntax

Delphi

Function TPDFlibSignatureVerifier.VerifyDocumentTimeStampExByName(Const FieldName: WideString;
  SignerIndex: Integer; RevocationMode: TPDFlibSignatureRevocationMode;
  Const ExpectedPolicyOID, ExpectedNonceHex: AnsiString;
  Out Report: TPDFlibTimeStampVerificationReport): TPDFlibSignatureVerifierResult;

Parameters

FieldNameFully qualified name of the signature field carrying the timestamp
SignerIndexZero-based signer index of the timestamp token
RevocationModesrmNone, srmCacheOnly, or srmOnline for the TSA certificate chain check
ExpectedPolicyOIDExpected policy OID dotted string; empty skips policy matching
ExpectedNonceHexExpected nonce as hexadecimal; empty skips nonce matching
ReportReceives generation time, serial number, policy and nonce details, chain result, and trust status

Return values

vsValidToken signature, message imprint, TSA checks, policy, nonce, and chain all passed
vsInvalidThe ByteRange is invalid or one of the timestamp checks failed
vsUnknownThe document is not open, the field does not exist, or its SubFilter is not ETSI.RFC3161

See also

TPDFlibSignatureVerifier, TPDFlibSignatureVerifierResult, NativeTimeStampRevocation