Class KeyAndCertCredential

    • Constructor Detail

      • KeyAndCertCredential

        public KeyAndCertCredential​(PrivateKey privateKey,
                                    X509Certificate[] certificateChain)
                             throws KeyStoreException
        Creates a new instance from the provided key and certificates.
        Parameters:
        privateKey - private key to be placed in this X509Credential's KeyStore
        certificateChain - certificates to be placed in this X509Credential's KeyStore. those certificates must match the provided privateKey. The user's certificate is assumed to be the first entry in the chain.
        Throws:
        KeyStoreException - if private key is invalid or doesn't match the certificate.