pdftools_sdk.signature_validation.custom_trust_list

Classes

CustomTrustList()

The custom collection of trusted certificates

class pdftools_sdk.signature_validation.custom_trust_list.CustomTrustList[source]

Bases: _NativeObject

The custom collection of trusted certificates

This class defines a custom collection of trusted certificates. They define the certificates used for pdftools_sdk.signature_validation.data_source.DataSource.CUSTOMTRUSTLIST and can be set in the validation profile with pdftools_sdk.signature_validation.profiles.profile.Profile.custom_trust_list .

__init__()[source]
add_certificates(certificate: IOBase) None[source]

Add one or more certificates

Add certificates to the trust list.

Parameters:

certificate (io.IOBase) – The sequence of certificates in either PEM (.pem, ASCII text) or DER (.cer, binary) form

Raises:

pdftools_sdk.corrupt_error.CorruptError – If the certificate is corrupt and cannot be read

add_archive(stream: IOBase, password: str | None = None) None[source]

Add certificates from a PFX (PKCS#12) archive

Add certificates to the trust list.

Parameters:
  • stream (io.IOBase) – The certificates in PKCS#12 format (.p12, .pfx)

  • password (Optional[str]) – The password required to decrypt the archive.

Raises: