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(PrivateKey privateKey,
X509Certificate[] certificateChain)
Creates a new instance from the provided key and certificates.
|
getCertificate, getCertificateChain, getKey, getKeyAlias, getKeyManager, getKeyPassword, getKeyStore, getSubjectName
public KeyAndCertCredential(PrivateKey privateKey, X509Certificate[] certificateChain) throws 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.KeyStoreException
- if private key is invalid or doesn't match the certificate.Copyright © 2012-2017 European Middleware Initiative. All Rights Reserved.