VerifyAdESHistoricalByName
Security and signatures
Requires the Enterprise edition — part of the Enterprise signature verification surface in TPDFlibSignatureVerifier (unit PDFlibEntSignVerify)
Description
Runs AdES historical validation for the named signature field and selected signer: signature integrity first, then the signer chain at the requested UTC time (0 selects the current UTC time).
If the requested-time chain is invalid, the verifier validates every signature timestamp and every document timestamp whose signed revision covers the target signature, derives the earliest trusted signature time and the latest whole-document archive time, and retries the chain at those proof-of-existence control times. Timestamps are proven newest first, so a timestamp whose TSA cannot be vouched for is not used as evidence, and neither is any older timestamp below it.
A signer certificate revoked for key compromise or CA compromise stays invalid however early the proof of existence, because once the key may have been in other hands no earlier proof can rule out a forged signature. A timestamp supplies an upper bound on when the signed bytes existed, not an inferred signing time.
With srmCacheOnly or srmOnline, current DSS, VRI, CRL, or OCSP material counts as historical evidence only when a trusted document timestamp covers the complete current document; otherwise the status is ahsEvidenceNotArchived.
Syntax
Delphi
Function TPDFlibSignatureVerifier.VerifyAdESHistoricalByName(Const FieldName: WideString;
SignerIndex: Integer; RevocationMode: TPDFlibSignatureRevocationMode;
ValidationTime: TDateTime;
Out Report: TPDFlibAdESHistoricalValidationReport): TPDFlibSignatureVerifierResult;Parameters
| FieldName | Fully qualified name of the signature field |
|---|---|
| SignerIndex | Zero-based CMS signer index within the signature |
| RevocationMode | srmNone lets a trusted timestamp supply the historical control time; srmCacheOnly and srmOnline additionally require an archived whole-document timestamp before DSS evidence counts as historical |
| ValidationTime | UTC validation time; 0 selects the current UTC time |
| Report | Receives the complete historical validation report, including ClaimedSigningTime, TimeConsistencyIssues bits, timestamp counts, time-slide state, and the PAdES baseline profile |
Return values
| vsValid | The chain is valid at the requested time (ahsValidAtRequestedTime) or at a trusted timestamp-derived proof time (ahsValidAtProofTime) |
|---|---|
| vsInvalid | Integrity failed (ahsIntegrityInvalid), no trusted proof exists (ahsNoTrustedProof), the evidence is not archived (ahsEvidenceNotArchived), or the chain is invalid at every derived control time (ahsHistoricalTrustInvalid) |
| vsUnknown | The document is not open or the field does not exist |
Remarks
ClaimedSigningTime holds the signer's /M time and TimeConsistencyIssues flags time-order problems as bits: 1 the claimed signing time is later than a signature timestamp, 2 a signature timestamp is later than a covering document timestamp, 4 a later document timestamp carries an earlier time, 8 a document timestamp could not be proven at the time of the one above it.
The baseline profile of the report is derived automatically before the call returns; DeriveBaselineProfile can re-derive it on demand.
See also
TPDFlibSignatureVerifier, TPDFlibSignatureVerifierResult, ApplyPAdESLongTermValidation, SetPAdESSignatureTimeStampToken, VerifyAuditEvidenceEnvelope