Class CustomTrustList


public class CustomTrustList extends NativeObject

The custom collection of trusted certificates

This class defines a custom collection of trusted certificates. They define the certificates used for DataSource.CUSTOM_TRUST_LIST and can be set in the validation profile with profiles.Profile.setCustomTrustList.
  • Constructor Details

    • CustomTrustList

      public CustomTrustList()
  • Method Details

    • addCertificates

      public void addCertificates(Stream certificate) throws CorruptException

      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 read
      IllegalArgumentException - if certificate is null
    • addArchive

      public void addArchive(Stream stream) throws CorruptException, PasswordException

      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 - if stream is null
    • addArchive

      public void addArchive(Stream stream, String password) throws CorruptException, PasswordException

      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 - if stream is null