Class SSLUtils


  • public final class SSLUtils
    extends java.lang.Object
    Utility class, which implements the set of useful SSL related operations.
    Author:
    Alexey Stashok
    • Constructor Detail

      • SSLUtils

        public SSLUtils()
    • Method Detail

      • getSSLEngine

        public static javax.net.ssl.SSLEngine getSSLEngine​(Connection connection)
      • setSSLEngine

        public static void setSSLEngine​(Connection connection,
                                        javax.net.ssl.SSLEngine sslEngine)
      • getSSLPacketSize

        public static int getSSLPacketSize​(Buffer buf)
                                    throws javax.net.ssl.SSLException
        Throws:
        javax.net.ssl.SSLException
      • executeDelegatedTask

        public static void executeDelegatedTask​(javax.net.ssl.SSLEngine sslEngine)
        Complete handshakes operations.
        Parameters:
        sslEngine - The SSLEngine used to manage the SSL operations.
      • isHandshaking

        public static boolean isHandshaking​(javax.net.ssl.SSLEngine sslEngine)
      • handshakeUnwrap

        public static javax.net.ssl.SSLEngineResult handshakeUnwrap​(int length,
                                                                    SSLConnectionContext sslCtx,
                                                                    Buffer inputBuffer,
                                                                    Buffer tmpOutputBuffer)
                                                             throws javax.net.ssl.SSLException
        Throws:
        javax.net.ssl.SSLException
      • allowDispose

        public static Buffer allowDispose​(Buffer buffer)