Class OpenSslKeyMaterialProvider

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.net.ssl.X509KeyManager keyManager  
      private java.lang.String password  
    • Constructor Summary

      Constructors 
      Constructor Description
      OpenSslKeyMaterialProvider​(javax.net.ssl.X509KeyManager keyManager, java.lang.String password)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) OpenSslKeyMaterial chooseKeyMaterial​(ByteBufAllocator allocator, java.lang.String alias)
      Returns the OpenSslKeyMaterial or null (if none) that should be used during the handshake by OpenSSL.
      (package private) void destroy()
      Will be invoked once the provider should be destroyed.
      (package private) javax.net.ssl.X509KeyManager keyManager()
      Returns the underlying X509KeyManager that is used.
      (package private) static void validateKeyMaterialSupported​(java.security.cert.X509Certificate[] keyCertChain, java.security.PrivateKey key, java.lang.String keyPassword)  
      private static void validateSupported​(java.security.cert.X509Certificate[] certificates)  
      private static void validateSupported​(java.security.PrivateKey key, java.lang.String password)  
      • Methods inherited from class java.lang.Object

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

      • keyManager

        private final javax.net.ssl.X509KeyManager keyManager
      • password

        private final java.lang.String password
    • Constructor Detail

      • OpenSslKeyMaterialProvider

        OpenSslKeyMaterialProvider​(javax.net.ssl.X509KeyManager keyManager,
                                   java.lang.String password)
    • Method Detail

      • validateKeyMaterialSupported

        static void validateKeyMaterialSupported​(java.security.cert.X509Certificate[] keyCertChain,
                                                 java.security.PrivateKey key,
                                                 java.lang.String keyPassword)
                                          throws javax.net.ssl.SSLException
        Throws:
        javax.net.ssl.SSLException
      • validateSupported

        private static void validateSupported​(java.security.PrivateKey key,
                                              java.lang.String password)
                                       throws javax.net.ssl.SSLException
        Throws:
        javax.net.ssl.SSLException
      • validateSupported

        private static void validateSupported​(java.security.cert.X509Certificate[] certificates)
                                       throws javax.net.ssl.SSLException
        Throws:
        javax.net.ssl.SSLException
      • keyManager

        javax.net.ssl.X509KeyManager keyManager()
        Returns the underlying X509KeyManager that is used.
      • chooseKeyMaterial

        OpenSslKeyMaterial chooseKeyMaterial​(ByteBufAllocator allocator,
                                             java.lang.String alias)
                                      throws java.lang.Exception
        Returns the OpenSslKeyMaterial or null (if none) that should be used during the handshake by OpenSSL.
        Throws:
        java.lang.Exception
      • destroy

        void destroy()
        Will be invoked once the provider should be destroyed.