Package com.pdftools.signaturevalidation
Class CustomTrustList
java.lang.Object
com.pdftools.internal.NativeBase
com.pdftools.internal.NativeObject
com.pdftools.signaturevalidation.CustomTrustList
The custom collection of trusted certificates
This class defines a custom collection of trusted certificates. They define the certificates used forDataSource.CUSTOM_TRUST_LIST and can be set in the validation profile with profiles.Profile.setCustomTrustList.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArchive(Stream stream) Add certificates from a PFX (PKCS#12) archivevoidaddArchive(Stream stream, String password) Add certificates from a PFX (PKCS#12) archivevoidaddCertificates(Stream certificate) Add one or more certificatesMethods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
Constructor Details
-
CustomTrustList
public CustomTrustList()
-
-
Method Details
-
addCertificates
Add one or more certificates
Add certificates to the trust list.- Parameters:
certificate- The sequence of certificates in either PEM (.pem, ASCII text) or DER (.cer, binary) form- Throws:
CorruptException- If the certificate is corrupt and cannot be readIllegalArgumentException- ifcertificateisnull
-
addArchive
Add certificates from a PFX (PKCS#12) archive
Add certificates to the trust list.- Parameters:
stream- The certificates in PKCS#12 format (.p12, .pfx)- Throws:
CorruptException- The PFX (PKCS#12) archive is corrupt and cannot be read.PasswordException- The password is invalid.IllegalArgumentException- ifstreamisnull
-
addArchive
Add certificates from a PFX (PKCS#12) archive
Add certificates to the trust list.- Parameters:
stream- The certificates in PKCS#12 format (.p12, .pfx)password- The password required to decrypt the archive.- Throws:
CorruptException- The PFX (PKCS#12) archive is corrupt and cannot be read.PasswordException- The password is invalid.IllegalArgumentException- ifstreamisnull
-