THPDFSignaturePolicyValidationStatus Type
Reports how the signature policy of a CMS signer info was parsed and checked against pinned expectations
Declaration
THPDFSignaturePolicyValidationStatus= (
spvsNotPresent,
spvsPresent,
spvsUnknownHash,
spvsHashVerified,
spvsIdentifierMismatch,
spvsHashMismatch,
spvsUnsupportedHashAlgorithm
);
Unit
HPDFSignVerify
Values
| Value | Purpose |
|---|---|
spvsNotPresent | The signer info carries no signature-policy attribute; with policy pinning required this yields svSignaturePolicyMismatch |
spvsPresent | The policy was parsed and its digest is a real hash rather than the all-zero placeholder |
spvsUnknownHash | The policy digest is the all-zero placeholder, so the hash cannot be checked without the policy document |
spvsHashVerified | The digest matched the pinned expected hash or the caller-supplied policy document hash |
spvsIdentifierMismatch | The policy OID differs from ExpectedSignaturePolicyOID in THPDFCMSVerifyOptions |
spvsHashMismatch | The digest differs from the pinned hash or document hash, or the hash is unknown while hash pinning is active |
spvsUnsupportedHashAlgorithm | The policy hash algorithm OID does not map to a supported implementation while a document hash check was requested |
Usage notes
- The failing statuses
spvsIdentifierMismatch,spvsHashMismatch, andspvsUnsupportedHashAlgorithmeach yield thesvSignaturePolicyMismatchverification status - Verification reports render the values as the lower-case tokens
notPresent,present,unknownHash,hashVerified,identifierMismatch,hashMismatch, andunsupportedHashAlgorithm - Checks run only for the fields pinned in
THPDFCMSVerifyOptions; an unpinned policy is reported without failing the signature