Class AutoSelfSignedKeyManager

  • All Implemented Interfaces:
    javax.net.ssl.KeyManager, javax.net.ssl.X509KeyManager

    public class AutoSelfSignedKeyManager
    extends javax.net.ssl.X509ExtendedKeyManager
    This object is used to provide a private key for authentication to the other side of a secure socket connection.
    • Constructor Summary

      Constructors 
      Constructor Description
      AutoSelfSignedKeyManager​(java.lang.String id)  
      AutoSelfSignedKeyManager​(java.lang.String id, java.security.cert.X509Certificate[] chain, java.security.PrivateKey privKey)  
      AutoSelfSignedKeyManager​(java.lang.String id, java.security.cert.X509Certificate cert, java.security.PrivateKey privKey)  
      AutoSelfSignedKeyManager​(java.lang.String id, java.security.PublicKey pubKey, java.security.PrivateKey privKey)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String chooseClientAlias​(java.lang.String[] keyTypes, java.security.Principal[] issuers, java.net.Socket socket)  
      java.lang.String chooseEngineClientAlias​(java.lang.String[] as, java.security.Principal[] aprincipal, javax.net.ssl.SSLEngine sslengine)  
      java.lang.String chooseEngineServerAlias​(java.lang.String s, java.security.Principal[] aprincipal, javax.net.ssl.SSLEngine sslengine)  
      java.lang.String chooseServerAlias​(java.lang.String keyType, java.security.Principal[] issuers, java.net.Socket socket)  
      java.security.cert.X509Certificate getCertificate()  
      java.security.cert.X509Certificate[] getCertificateChain​(java.lang.String alias)  
      java.lang.String[] getClientAliases​(java.lang.String keyType, java.security.Principal[] issuers)  
      java.security.PrivateKey getPrivateKey​(java.lang.String alias)  
      java.lang.String[] getServerAliases​(java.lang.String keyType, java.security.Principal[] issuers)  
      • Methods inherited from class java.lang.Object

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

      • AutoSelfSignedKeyManager

        public AutoSelfSignedKeyManager​(java.lang.String id,
                                        java.security.cert.X509Certificate[] chain,
                                        java.security.PrivateKey privKey)
      • AutoSelfSignedKeyManager

        public AutoSelfSignedKeyManager​(java.lang.String id,
                                        java.security.cert.X509Certificate cert,
                                        java.security.PrivateKey privKey)
      • AutoSelfSignedKeyManager

        public AutoSelfSignedKeyManager​(java.lang.String id,
                                        java.security.PublicKey pubKey,
                                        java.security.PrivateKey privKey)
      • AutoSelfSignedKeyManager

        public AutoSelfSignedKeyManager​(java.lang.String id)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • getCertificate

        public java.security.cert.X509Certificate getCertificate()
      • chooseClientAlias

        public java.lang.String chooseClientAlias​(java.lang.String[] keyTypes,
                                                  java.security.Principal[] issuers,
                                                  java.net.Socket socket)
      • chooseServerAlias

        public java.lang.String chooseServerAlias​(java.lang.String keyType,
                                                  java.security.Principal[] issuers,
                                                  java.net.Socket socket)
      • getServerAliases

        public java.lang.String[] getServerAliases​(java.lang.String keyType,
                                                   java.security.Principal[] issuers)
      • getCertificateChain

        public java.security.cert.X509Certificate[] getCertificateChain​(java.lang.String alias)
      • getClientAliases

        public java.lang.String[] getClientAliases​(java.lang.String keyType,
                                                   java.security.Principal[] issuers)
      • getPrivateKey

        public java.security.PrivateKey getPrivateKey​(java.lang.String alias)
      • chooseEngineClientAlias

        public java.lang.String chooseEngineClientAlias​(java.lang.String[] as,
                                                        java.security.Principal[] aprincipal,
                                                        javax.net.ssl.SSLEngine sslengine)
        Overrides:
        chooseEngineClientAlias in class javax.net.ssl.X509ExtendedKeyManager
      • chooseEngineServerAlias

        public java.lang.String chooseEngineServerAlias​(java.lang.String s,
                                                        java.security.Principal[] aprincipal,
                                                        javax.net.ssl.SSLEngine sslengine)
        Overrides:
        chooseEngineServerAlias in class javax.net.ssl.X509ExtendedKeyManager