public final class X500PrivateCredential extends Objectimplements Destroyable
This class represents an X500PrivateCredential. It associates an X.509 certificate, corresponding private key and the KeyStore alias used to reference that exact key pair in the KeyStore. This enables looking up the private credentials for an X.500 principal in a subject.
| Constructor and Description |
|---|
X500PrivateCredential(X509Certificate
Creates an X500PrivateCredential that associates an X.509 certificate, a private key and the KeyStore alias.
|
X500PrivateCredential(X509Certificate
Creates an X500PrivateCredential that associates an X.509 certificate, a private key and the KeyStore alias.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Clears the references to the X.509 certificate, private key and the KeyStore alias in this object.
|
String |
getAlias()
Returns the KeyStore alias.
|
X509Certificate |
getCertificate()
Returns the X.509 certificate.
|
PrivateKey |
getPrivateKey()
Returns the PrivateKey.
|
boolean |
isDestroyed()
Determines if the references to the X.509 certificate and private key in this object have been cleared.
|
public X500PrivateCredential(X509Certificatecert, PrivateKey key)
cert - X509Certificate
key - PrivateKey for the certificate
IllegalArgumentException - if either
cert or
key is null
public X500PrivateCredential(X509Certificatecert, PrivateKey key, String alias)
cert - X509Certificate
key - PrivateKey for the certificate
alias - KeyStore alias
IllegalArgumentException - if either
cert,
key or
alias is null
public X509CertificategetCertificate()
public PrivateKeygetPrivateKey()
public StringgetAlias()
public void destroy()
public boolean isDestroyed()
isDestroyed in interface
Destroyable