Class CustomTrustList

    • Constructor Detail

      • CustomTrustList

        public CustomTrustList()
    • Method Detail

      • 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
        java.lang.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.
        java.lang.IllegalArgumentException - if stream is null
      • addArchive

        public void addArchive​(Stream stream,
                               java.lang.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.
        java.lang.IllegalArgumentException - if stream is null