THPDFSignaturePolicyValidationStatus Type
Reports how a CMS signer info's signature policy 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; where policy pinning is required this yields svSignaturePolicyMismatch |
spvsPresent | The policy parsed cleanly and its digest is a genuine hash rather than the all-zero placeholder |
spvsUnknownHash | The policy digest is the all-zero placeholder, so without the policy document the hash cannot be checked |
spvsHashVerified | The digest tallied with the pinned expected hash or with the policy document hash supplied by the caller |
spvsIdentifierMismatch | The policy OID differs from ExpectedSignaturePolicyOID as set in THPDFCMSVerifyOptions |
spvsHashMismatch | The digest differs from the pinned hash or the document hash, or the hash is unknown whilst hash pinning is active |
spvsUnsupportedHashAlgorithm | The policy hash algorithm OID maps to no supported implementation, yet a document hash check was requested |
Usage notes
- The failing statuses
spvsIdentifierMismatch,spvsHashMismatchandspvsUnsupportedHashAlgorithmeach produce thesvSignaturePolicyMismatchverification status - Verification reports write the values out as the lower-case tokens
notPresent,present,unknownHash,hashVerified,identifierMismatch,hashMismatchandunsupportedHashAlgorithm - Checks run only for the fields pinned in
THPDFCMSVerifyOptions; an unpinned policy is reported without the signature failing