Top Description Fields Constructors Methods
javax.security.auth.x500

public final Class X500PrivateCredential

extends Object
implements Destroyable
Class Inheritance
All Implemented Interfaces
javax.security.auth.Destroyable
Imports
java.security.PrivateKey, java.security.cert.X509Certificate, javax.security.auth.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.

Since
1.4

Field Summary

Modifier and TypeField and Description
private String
private X509Certificate
private PrivateKey

Constructor Summary

AccessConstructor and Description
public
X500PrivateCredential(X509Certificate
X509Certificate
cert
,
PrivateKey
PrivateKey for the certificate
key
)

Creates an X500PrivateCredential that associates an X.509 certificate, a private key and the KeyStore alias.

public
X500PrivateCredential(X509Certificate
X509Certificate
cert
,
PrivateKey
PrivateKey for the certificate
key
,
String
KeyStore alias
alias
)

Creates an X500PrivateCredential that associates an X.509 certificate, a private key and the KeyStore alias.

Method Summary

Modifier and TypeMethod and Description
public void
destroy()

Overrides default javax.security.auth.Destroyable.destroy.

Clears the references to the X.509 certificate, private key and the KeyStore alias in this object.

public String

Returns:

the KeyStore alias
getAlias
()

Returns the KeyStore alias.

public X509Certificate

Returns:

the X509Certificate
getCertificate
()

Returns the X.509 certificate.

public PrivateKey

Returns:

the PrivateKey
getPrivateKey
()

Returns the PrivateKey.

public boolean

Returns:

true if X509Certificate and the PrivateKey are null
isDestroyed
()

Overrides default javax.security.auth.Destroyable.isDestroyed.

Determines if the references to the X.509 certificate and private key in this object have been cleared.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aliasback to summary
private String alias
certback to summary
private X509Certificate cert
keyback to summary
private PrivateKey key

Constructor Detail

X500PrivateCredentialback to summary
public X500PrivateCredential(X509Certificate cert, PrivateKey key)

Creates an X500PrivateCredential that associates an X.509 certificate, a private key and the KeyStore alias.

Parameters
cert:X509Certificate

X509Certificate

key:PrivateKey

PrivateKey for the certificate

Exceptions
IllegalArgumentException:
if either cert or key is null
X500PrivateCredentialback to summary
public X500PrivateCredential(X509Certificate cert, PrivateKey key, String alias)

Creates an X500PrivateCredential that associates an X.509 certificate, a private key and the KeyStore alias.

Parameters
cert:X509Certificate

X509Certificate

key:PrivateKey

PrivateKey for the certificate

alias:String

KeyStore alias

Exceptions
IllegalArgumentException:
if either cert, key or alias is null

Method Detail

destroyback to summary
public void destroy()

Overrides default javax.security.auth.Destroyable.destroy.

Clears the references to the X.509 certificate, private key and the KeyStore alias in this object.

getAliasback to summary
public String getAlias()

Returns the KeyStore alias.

Returns:String

the KeyStore alias

getCertificateback to summary
public X509Certificate getCertificate()

Returns the X.509 certificate.

Returns:X509Certificate

the X509Certificate

getPrivateKeyback to summary
public PrivateKey getPrivateKey()

Returns the PrivateKey.

Returns:PrivateKey

the PrivateKey

isDestroyedback to summary
public boolean isDestroyed()

Overrides default javax.security.auth.Destroyable.isDestroyed.

Determines if the references to the X.509 certificate and private key in this object have been cleared.

Returns:boolean

true if X509Certificate and the PrivateKey are null