public class KeyAndCertCredential extends AbstractX509Credential
PrivateKey and X509Certificate chain as a X509Credential.
This class is especially useful for quick, in-memory creation of KeyStore when
key and certificate are already loaded.
ALIAS, KEY_PASSWD, ks| Constructor and Description |
|---|
KeyAndCertCredential(java.security.PrivateKey privateKey,
java.security.cert.X509Certificate[] certificateChain)
Creates a new instance from the provided key and certificates.
|
getCertificate, getCertificateChain, getKey, getKeyAlias, getKeyManager, getKeyPassword, getKeyStore, getSubjectNamepublic KeyAndCertCredential(java.security.PrivateKey privateKey,
java.security.cert.X509Certificate[] certificateChain)
throws java.security.KeyStoreException
privateKey - private key to be placed in this X509Credential's KeyStorecertificateChain - 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.java.security.KeyStoreException - if private key is invalid or doesn't match the certificate.