TPDFlibTimeStampVerificationReport
Data types, security and signatures
Description
TPDFlibTimeStampVerificationReport is filled by the document timestamp and signature timestamp verification methods of TPDFlibSignatureVerifier, including the Ex variants that accept a revocation mode, an expected policy OID and an expected nonce.
Every check is reported in a separate field, so a caller can distinguish a broken token from a valid token whose TSA certificate is untrusted or whose revocation state stays unknown.
Syntax
Delphi
TPDFlibTimeStampVerificationReport = Record
FieldName: WideString;
Kind: TPDFlibTimeStampKind;
SignerIndex: Integer;
TimeStampIndex: Integer;
SignerCount: Integer;
Result: TPDFlibSignatureVerifierResult;
TokenSignatureValid: Boolean;
MessageImprintValid: Boolean;
ExtendedKeyUsageValid: Boolean;
TSANamePresent: Boolean;
TSANameMatched: Boolean;
PolicyOID: AnsiString;
HashAlgorithmOID: AnsiString;
SerialNumberHex: AnsiString;
NonceHex: AnsiString;
PolicyMatched: Boolean;
NonceMatched: Boolean;
GenerationTime: TDateTime;
RevocationMode: TPDFlibSignatureRevocationMode;
ChainResult: TPDFlibSignatureVerifierResult;
TrustStatus: TPDFlibSignatureTrustStatus;
NativeError: Cardinal;
OCSPRequestSigningError: Cardinal;
CRLSignerCheckedCount, CRLSignerGoodCount, CRLSignerRevokedCount, CRLSignerUnknownCount: Integer;
End;Fields
| FieldName | Signature field that carries the timestamp: the timestamp field itself for a document timestamp, the signed field for a signature timestamp |
|---|---|
| Kind | tskDocument for a document timestamp, tskSignature for a signature timestamp attribute, tskUnknown before the kind is set |
| SignerIndex | Zero-based CMS signer index requested by the caller |
| TimeStampIndex | Zero-based index among the signer's timestamp attributes; -1 for a document timestamp |
| SignerCount | Number of CMS signers in the token; a valid token has exactly one |
| Result | Overall result of the timestamp verification |
| TokenSignatureValid | Token CMS signature verified, with one signer and the TSTInfo content type |
| MessageImprintValid | Hash computed over the covered bytes equals the token message imprint |
| ExtendedKeyUsageValid | TSA certificate carries the id-kp-timeStamping extended key usage |
| TSANamePresent | TSTInfo contains a TSA GeneralName |
| TSANameMatched | TSA name matches the signing certificate subject or subject alternative name; True when the token carries no name |
| PolicyOID | Policy OID from the TSTInfo |
| HashAlgorithmOID | Message-imprint hash algorithm OID from the TSTInfo |
| SerialNumberHex | Token serial number as an uppercase hexadecimal string |
| NonceHex | Nonce from the TSTInfo as hexadecimal; empty when the token has none |
| PolicyMatched | True when no expected policy was supplied or it equals PolicyOID |
| NonceMatched | True when no expected nonce was supplied or it equals NonceHex |
| GenerationTime | TSA generation time (genTime) in UTC |
| RevocationMode | Revocation mode used for the TSA certificate chain |
| ChainResult | Result of the TSA certificate chain validation |
| TrustStatus | Trust classification of the TSA chain |
| NativeError | Platform or native verification error code; 0 when no error was reported |
| OCSPRequestSigningError | Local error from signing an OCSP request; 0 when no signed request was configured |
| CRLSignerCheckedCount | Auxiliary CRL signer evaluations completed |
| CRLSignerGoodCount | Auxiliary CRL signers with authenticated good status |
| CRLSignerRevokedCount | Auxiliary CRL signers with authenticated revocation |
| CRLSignerUnknownCount | Auxiliary CRL signers whose status stayed unresolved |
Remarks
TokenSignatureValid alone does not make the timestamp trustworthy: the imprint, extended key usage, TSA name, policy, nonce and chain fields each gate the final result.
GenerationTime is the TSA's claim. The verifier trusts it only as far as the TSA chain validates, either at the requested time or at the control time supplied by newer evidence during historical validation.
A token with more than one signer, or with an inner content type other than TSTInfo, fails before the timestamp fields are decoded.
The report is initialised before any decoding, so an early failure leaves FieldName, Kind and SignerIndex populated and the remaining fields at their defaults. The CRL signer counts are populated by the native route and stay zero on Windows.
See also
TPDFlibSignatureVerifier, VerifyDocumentTimeStampEx, VerifySignatureTimeStampEx, NativeTimeStampRevocation, TPDFlibSignatureVerifierResult