Class AbstractDelegatingX509Credential

  • All Implemented Interfaces:
    X509Credential
    Direct Known Subclasses:
    DERCredential, PEMCredential

    public abstract class AbstractDelegatingX509Credential
    extends java.lang.Object
    implements X509Credential
    Abstract base for credential implementations which delegate to another one.
    Author:
    K. Benedyczak
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.security.cert.X509Certificate getCertificate()
      Helper method to get certificate from the underlying keystore
      java.security.cert.X509Certificate[] getCertificateChain()
      Helper method to get certificate chain from the underlying keystore
      java.security.PrivateKey getKey()
      Helper method to get private key from the underlying keystore
      java.lang.String getKeyAlias()
      Returns an alias which can be used to obtain the PrivateKey entry from the KeyStore returned by the X509Credential.getKeyStore() method.
      javax.net.ssl.X509ExtendedKeyManager getKeyManager()
      Returns a KeyManager which accompanies the KeyStore.
      char[] getKeyPassword()
      Returns a password which can be used to obtain PrivateKey entry from the KeyStore returned by the X509Credential.getKeyStore() method, with the alias returned by the X509Credential.getKeyAlias() method.
      java.security.KeyStore getKeyStore()
      Returns the credential in a keystore.
      java.lang.String getSubjectName()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractDelegatingX509Credential

        public AbstractDelegatingX509Credential()
    • Method Detail

      • getKeyStore

        public java.security.KeyStore getKeyStore()
        Returns the credential in a keystore.
        Specified by:
        getKeyStore in interface X509Credential
        Returns:
        the KeyStore
      • getKeyManager

        public javax.net.ssl.X509ExtendedKeyManager getKeyManager()
        Returns a KeyManager which accompanies the KeyStore.
        Specified by:
        getKeyManager in interface X509Credential
        Returns:
        the KeyManager
      • getKeyAlias

        public java.lang.String getKeyAlias()
        Returns an alias which can be used to obtain the PrivateKey entry from the KeyStore returned by the X509Credential.getKeyStore() method.
        Specified by:
        getKeyAlias in interface X509Credential
        Returns:
        key alias
      • getKey

        public java.security.PrivateKey getKey()
        Helper method to get private key from the underlying keystore
        Specified by:
        getKey in interface X509Credential
        Returns:
        private key
      • getCertificate

        public java.security.cert.X509Certificate getCertificate()
        Helper method to get certificate from the underlying keystore
        Specified by:
        getCertificate in interface X509Credential
        Returns:
        certificate
      • getCertificateChain

        public java.security.cert.X509Certificate[] getCertificateChain()
        Helper method to get certificate chain from the underlying keystore
        Specified by:
        getCertificateChain in interface X509Credential
        Returns:
        certificate chain
      • getSubjectName

        public java.lang.String getSubjectName()
        Specified by:
        getSubjectName in interface X509Credential
        Returns:
        RFC 2253 distinguished name of the certificate subject