X500PrivateCredentialpublic final class X500PrivateCredential extends Object implements 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. |
Fields Summary |
---|
private X509Certificate | cert | private PrivateKey | key | private String | alias |
Constructors Summary |
---|
public X500PrivateCredential(X509Certificate cert, PrivateKey key)Creates an X500PrivateCredential that associates an X.509 certificate,
a private key and the KeyStore alias.
if (cert == null || key == null )
throw new IllegalArgumentException();
this.cert = cert;
this.key = key;
this.alias=null;
| public X500PrivateCredential(X509Certificate cert, PrivateKey key, String alias)Creates an X500PrivateCredential that associates an X.509 certificate,
a private key and the KeyStore alias.
if (cert == null || key == null|| alias == null )
throw new IllegalArgumentException();
this.cert = cert;
this.key = key;
this.alias=alias;
|
Methods Summary |
---|
public void | destroy()Clears the references to the X.509 certificate, private key and the
KeyStore alias in this object.
cert = null;
key = null;
alias =null;
| public java.lang.String | getAlias()Returns the KeyStore alias.
return alias;
| public java.security.cert.X509Certificate | getCertificate()Returns the X.509 certificate.
return cert;
| public java.security.PrivateKey | getPrivateKey()Returns the PrivateKey.
return key;
| public boolean | isDestroyed()Determines if the references to the X.509 certificate and private key
in this object have been cleared.
return cert == null && key == null && alias==null;
|
|