THPDFCMSVerifyOptions Record
CMS 서명 검증 한도, 외부 provider, 서명 정책 고정, 타임스탬프 재검증을 설정합니다
선언
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 | sign·verify 원형에 쓰는 선택적 외부 THPDFSignatureProvider. nil이면 내장 구현을 고릅니다 |
AllowMLDSA | 검증 중 ML-DSA 서명을 허용합니다 |
OpenSSLLibraryPath | 검증이 OpenSSL 백엔드로 갈 때 OpenSSL 라이브러리가 있는 디렉터리 |
MaxSignerCount | 처리할 primary 서명자 수 상한. Default는 256으로 설정합니다 |
MaxCounterSignatureDepth | counter-signature 중첩 한도. Default는 8로 설정합니다 |
RequireSignaturePolicy | True면 서명 정책이 없는 서명은 실패합니다 |
ExpectedSignaturePolicyOID | primary SignerInfo가 제시해야 하는 정책 OID. 비어 있으면 제약하지 않습니다 |
ExpectedSignaturePolicyHash | 고정할 기대 정책 다이제스트. 비어 있으면 제약하지 않습니다 |
SignaturePolicyDocument | 해시 비교에 쓰는 정책 문서 바이트 |
VerifySignaturePolicyDocumentHash | True면 일부러 비워 둔 정책 문서를 해시합니다 |
RejectUnknownSignaturePolicyHash | 내장된 정책 해시가 기대 값과 하나도 일치하지 않으면 검증에 실패합니다 |
SkipSignatureTimestampVerification | 배치 검증에서 내장된 서명 타임스탬프 토큰의 캐시된 판정을 신뢰합니다 |
Default | MaxSignerCount 256, MaxCounterSignatureDepth 8인 0 초기화 레코드를 돌려주는 클래스 함수 |
사용 참고 사항
- 0으로 채운 지역 변수 대신 항상
THPDFCMSVerifyOptions.Default에서 시작해야 서명자·깊이 한도가 실제로 적용됩니다 - 정책 고정 필드는 primary SignerInfo 값에만 적용됩니다. 기대 필드가 비어 있으면 해당 정책 검사는 제약받지 않습니다
- 공유 타임스탬프 캐시가 토큰 판정을 이미 갖고 있으면 배치 검증이
SkipSignatureTimestampVerification을 설정합니다. 문서 타임스탬프는 절대 이 경로를 타지 않습니다