javax.security.auth.x500
public final class: X500PrivateCredential [javadoc |
source]
java.lang.Object
javax.security.auth.x500.X500PrivateCredential
All Implemented Interfaces:
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: |
public X500PrivateCredential(X509Certificate cert,
PrivateKey key) {
if (cert == null || key == null )
throw new IllegalArgumentException();
this.cert = cert;
this.key = key;
this.alias=null;
}
Creates an X500PrivateCredential that associates an X.509 certificate,
a private key and the KeyStore alias.
Parameters:
cert - X509Certificate
key - PrivateKey for the certificate
Throws:
IllegalArgumentException - if either cert or
key is null
- exception:
IllegalArgumentException - if either cert or
key is null
|
public X500PrivateCredential(X509Certificate cert,
PrivateKey key,
String alias) {
if (cert == null || key == null|| alias == null )
throw new IllegalArgumentException();
this.cert = cert;
this.key = key;
this.alias=alias;
}
Creates an X500PrivateCredential that associates an X.509 certificate,
a private key and the KeyStore alias.
Parameters:
cert - X509Certificate
key - PrivateKey for the certificate
alias - KeyStore alias
Throws:
IllegalArgumentException - if either cert ,
key or alias is null
- exception:
IllegalArgumentException - if either cert ,
key or alias is null
|
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |