Name
X500PrivateCredential
Synopsis
This class associates a
java.security.cert.X509Certificate
with a
java.security.PrivateKey
for that certificate,
and, optionally, the keystore alias used to retrieve the certificate
and key from a java.security.KeyStore
. The class
defines methods to retreive the certificate, key, and alias, and also
implements the methods of the
javax.security.cert.Destroyable
interface.
Figure 19-29. javax.security.auth.x500.X500PrivateCredential
public final class X500PrivateCredential implements javax.security.auth.Destroyable { // Public Constructors public X500PrivateCredential(java.security.cert.X509Certificate cert, java.security.PrivateKey key); public X500PrivateCredential(java.security.cert.X509Certificate cert, java.security.PrivateKey key, String alias); // Public Instance Methods public String getAlias( ); public java.security.cert.X509Certificate getCertificate( ); public java.security.PrivateKey getPrivateKey( ); // Methods Implementing Destroyable public void destroy( ); public boolean isDestroyed( ); }
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.