Package Summary  Overview Summary

class:X500PrivateCredential [NONE]

  • All Implemented Interfaces:
    Destroyable

    public 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.

    Since:
    1.4

constructor:<init>(java.security.cert.X509Certificate,java.security.PrivateKey) [NONE]

  • X500PrivateCredential

    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
    key - PrivateKey for the certificate
    Throws:
    IllegalArgumentException - if either cert or key is null

constructor:<init>(java.security.cert.X509Certificate,java.security.PrivateKey,java.lang.String) [NONE]

  • X500PrivateCredential

    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
    key - PrivateKey for the certificate
    alias - KeyStore alias
    Throws:
    IllegalArgumentException - if either cert, key or alias is null

method:getCertificate() [NONE]

  • getCertificate

    public X509Certificate getCertificate()
    Returns the X.509 certificate.
    Returns:
    the X509Certificate

method:getPrivateKey() [NONE]

  • getPrivateKey

    public PrivateKey getPrivateKey()
    Returns the PrivateKey.
    Returns:
    the PrivateKey

method:getAlias() [NONE]

  • getAlias

    public String getAlias()
    Returns the KeyStore alias.
    Returns:
    the KeyStore alias

method:destroy() [NONE]

  • destroy

    public void destroy()
    Clears the references to the X.509 certificate, private key and the KeyStore alias in this object.
    Specified by:
    destroy in interface Destroyable

method:isDestroyed() [NONE]

  • isDestroyed

    public boolean isDestroyed()
    Determines if the references to the X.509 certificate and private key in this object have been cleared.
    Specified by:
    isDestroyed in interface Destroyable
    Returns:
    true if X509Certificate and the PrivateKey are null

© 2018 Oracle Corporation and/or its affiliates