THPDFCMSVerifyOptions 记录

配置 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类函数,返回清零记录并将 MaxSignerCount 设为 256、MaxCounterSignatureDepth 设为 8

使用说明

相关 API