THPDFCMSVerifyOptions Record

設定 CMS 簽章驗證限制、外部提供者、簽章原則釘選與時間戳記重新驗證

宣告

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;

單元

HPDFSignVerify

欄位

欄位用途
SignatureProvider選用的外部 THPDFSignatureProvider,用於簽署與驗證原語;nil 表示使用內建實作
AllowMLDSA允許驗證期間接受 ML-DSA 簽章
OpenSSLLibraryPath驗證走 OpenSSL 後端時,存放 OpenSSL 程式庫的目錄
MaxSignerCount處理的主要簽署者數量上限;Default 設為 256
MaxCounterSignatureDepth副署的巢狀深度限制;Default 設為 8
RequireSignaturePolicy為 True 時,不帶簽章原則的簽章會失敗
ExpectedSignaturePolicyOID主要 SignerInfo 必須出示的原則 OID;留空則不約束
ExpectedSignaturePolicyHash釘選用的預期原則摘要;留空則不約束
SignaturePolicyDocument供雜湊比較使用的原則文件位元組
VerifySignaturePolicyDocumentHash為 True 時,對刻意留空的原則文件也計算雜湊
RejectUnknownSignaturePolicyHash內嵌原則雜湊不符合任何預期值時,驗證失敗
SkipSignatureTimestampVerification批次驗證期間,對內嵌簽章時間戳記權杖採信快取判定
Default類別函式,傳回歸零 record,並設 MaxSignerCount 256 與 MaxCounterSignatureDepth 8

使用說明

相關 API