THPDFCMSVerifyOptions Record

Configures CMS signature verification limits, external providers, signature-policy pinning and timestamp re-verification

Declaration

THPDFCMSVerifyOptions= record
  SignatureProvider: THPDFSignatureProvider;
  AllowMLDSA: boolean;
  OpenSSLLibraryPath: string;
  MaxSignerCount: Integer;
  MaxCounterSignatureDepth: Integer;
  // Policy pinning is applied to primary SignerInfo values. Empty
  // expected fields do not constrain the corresponding policy field
  RequireSignaturePolicy: boolean;
  ExpectedSignaturePolicyOID: AnsiString;
  ExpectedSignaturePolicyHash: TBytes;
  SignaturePolicyDocument: TBytes;
  // Set this flag to hash an intentionally empty policy document
  VerifySignaturePolicyDocumentHash: boolean;
  RejectUnknownSignaturePolicyHash: boolean;
  // Batch validation sets this when a shared timestamp cache already
  // holds the verdict for the embedded signature timestamp token: token
  // re-verification is skipped and the caller restores the cached
  // THPDFTimestampInfo afterwards. Document timestamps (ETSI.RFC3161)
  // never take this path because the token is the primary signature
  SkipSignatureTimestampVerification: boolean;
  class function Default: THPDFCMSVerifyOptions; static;
end;

Unit

HPDFSignVerify

Fields

FieldPurpose
SignatureProviderOptional external THPDFSignatureProvider used for sign and verify primitives; nil selects the built-in implementation
AllowMLDSAPermits ML-DSA signatures during verification
OpenSSLLibraryPathDirectory holding the OpenSSL libraries when verification goes through the OpenSSL backend
MaxSignerCountUpper bound on primary signers processed; Default sets 256
MaxCounterSignatureDepthNesting limit for counter-signatures; Default sets 8
RequireSignaturePolicyWhen True, signatures without a signature policy fail
ExpectedSignaturePolicyOIDPolicy OID a primary SignerInfo must present; empty does not constrain
ExpectedSignaturePolicyHashExpected policy digest to pin; empty does not constrain
SignaturePolicyDocumentPolicy document bytes used for hash comparison
VerifySignaturePolicyDocumentHashHash an intentionally empty policy document when True
RejectUnknownSignaturePolicyHashFails verification when the embedded policy hash matches no expected value
SkipSignatureTimestampVerificationTrusts a cached verdict for the embedded signature timestamp token during batch validation
DefaultClass function returning a zeroed record with MaxSignerCount 256 and MaxCounterSignatureDepth 8

Usage notes

Related APIs