SetSignProcessSignaturePolicy
Security and Signatures
Description
Sets the CAdES signature-policy-identifier signed attribute for the PAdES-B-B signing path.
Syntax
Delphi
Function SetSignProcessSignaturePolicy(SignProcessID: Integer; Const PolicyOID, PolicyHashHex: WideString; HashAlgorithm: Integer): Integer;Parameters
| SignProcessID | Value returned by one of the NewSignProcessFrom* functions. |
|---|---|
| PolicyOID | Dotted-decimal OID identifying the policy document. Pass an empty value to clear the attribute. |
| PolicyHashHex | Hex-encoded hash of the policy document. |
| HashAlgorithm | Digest code: 0 auto/SHA-256, 1 SHA-1, 2 SHA-256, 3 SHA-384, 4 SHA-512. |
Returns
Returns 1 when the process exists and the hash-algorithm code is accepted; returns 0 otherwise.
Remarks
Odd-length or non-hex policy hash input is truncated at the first invalid pair. The attribute is emitted only for the ETSI.CAdES.detached SubFilter path.
See also
SetSignProcessCustomSubFilter, SetSignProcessDigestAlgorithm