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
| FieldName | Fully qualified name of the signature field carrying the timestamp |
|---|---|
| SignerIndex | Zero-based signer index of the timestamp token |
| RevocationMode | srmNone, srmCacheOnly, or srmOnline for the TSA certificate chain check |
| ExpectedPolicyOID | Expected policy OID dotted string; empty skips policy matching |
| ExpectedNonceHex | Expected nonce as hexadecimal; empty skips nonce matching |
| Report | Receives generation time, serial number, policy and nonce details, chain result, and trust status |
Return values
| vsValid | Token signature, message imprint, TSA checks, policy, nonce, and chain all passed |
|---|---|
| vsInvalid | The ByteRange is invalid or one of the timestamp checks failed |
| vsUnknown | The document is not open, the field does not exist, or its SubFilter is not ETSI.RFC3161 |
See also
TPDFlibSignatureVerifier, TPDFlibSignatureVerifierResult, NativeTimeStampRevocation