SetSignatureFieldSeedValue

Security and signatures

Description

Creates or replaces the /SV seed-value dictionary of an unsigned signature field and selects which constraints a signing operation must enforce

Syntax

Delphi

Function TPDFlib.SetSignatureFieldSeedValue(Index, Flags: Integer; Const SubFilters, DigestMethods, Reasons: WideString; Const LegalAttestations: WideString= ''): Integer;

ActiveX

Function PDFlib::SetSignatureFieldSeedValue(Index As Long, Flags As Long, SubFilters As String, DigestMethods As String, Reasons As String) As Long

DLL

int DLSetSignatureFieldSeedValue(int InstanceID, int Index, int Flags, const wchar_t* SubFilters, const wchar_t* DigestMethods, const wchar_t* Reasons);

Parameters

IndexOne-based form-field index identifying an unsigned signature field
FlagsBit mask selecting required constraints: PDF_SIGNATURE_SEED_FILTER (1) filter, PDF_SIGNATURE_SEED_SUBFILTER (2) SubFilter, PDF_SIGNATURE_SEED_VERSION (4) seed-value version, PDF_SIGNATURE_SEED_REASON (8) reason, PDF_SIGNATURE_SEED_LEGAL_ATTESTATION (16) legal attestation, PDF_SIGNATURE_SEED_ADD_REV_INFO (32) revocation information, and PDF_SIGNATURE_SEED_DIGEST_METHOD (64) digest method
SubFiltersSemicolon-delimited allowed SubFilter names such as ETSI.CAdES.detached or adbe.pkcs7.detached
DigestMethodsSemicolon-delimited allowed digest names: SHA1, SHA256, SHA384, SHA512, SHA3-256, SHA3-384, or SHA3-512
ReasonsSemicolon-delimited allowed signing reasons; an empty list or . prohibits a custom reason when the reason flag is required
LegalAttestationsSemicolon-delimited allowed legal attestation names for the /LegalAttestation seed-value constraint; empty by default. Delphi API extension not exposed through the DLL or ActiveX layers

Return values

1The seed-value dictionary was written
0The field, flags, or a required value list was invalid

Remarks

The method writes seed-value version 2 and filter Adobe.PPKLite

Required constraints that this release cannot enforce are rejected when the dictionary is authored and fail closed when read from an existing PDF

The ANSI DLL variant is DLSetSignatureFieldSeedValueA

See also

AddSignatureFieldSeedCertificate, ClearSignatureFieldSeedValue, GetSignProcessSeedValueError