Package org.glassfish.grizzly.ssl
Class SSLUtils
- java.lang.Object
-
- org.glassfish.grizzly.ssl.SSLUtils
-
public final class SSLUtils extends Object
Utility class, which implements the set of useful SSL related operations.- Author:
- Alexey Stashok
-
-
Constructor Summary
Constructors Constructor Description SSLUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BufferallocateInputBuffer(SSLConnectionContext sslCtx)static BufferallowDispose(Buffer buffer)static voidexecuteDelegatedTask(SSLEngine sslEngine)Complete handshakes operations.static SSLConnectionContextgetSslConnectionContext(Connection connection)static SSLEnginegetSSLEngine(Connection connection)static intgetSSLPacketSize(Buffer buf)static SSLEngineResulthandshakeUnwrap(int length, SSLConnectionContext sslCtx, Buffer inputBuffer, Buffer tmpOutputBuffer)static BufferhandshakeWrap(Connection connection, SSLConnectionContext sslCtx, Buffer netBuffer)static booleanisHandshaking(SSLEngine sslEngine)static voidsetSSLEngine(Connection connection, SSLEngine sslEngine)
-
-
-
Method Detail
-
getSslConnectionContext
public static SSLConnectionContext getSslConnectionContext(Connection connection)
-
getSSLEngine
public static SSLEngine getSSLEngine(Connection connection)
-
setSSLEngine
public static void setSSLEngine(Connection connection, SSLEngine sslEngine)
-
getSSLPacketSize
public static int getSSLPacketSize(Buffer buf) throws SSLException
- Throws:
SSLException
-
executeDelegatedTask
public static void executeDelegatedTask(SSLEngine sslEngine)
Complete handshakes operations.- Parameters:
sslEngine- The SSLEngine used to manage the SSL operations.
-
isHandshaking
public static boolean isHandshaking(SSLEngine sslEngine)
-
handshakeUnwrap
public static SSLEngineResult handshakeUnwrap(int length, SSLConnectionContext sslCtx, Buffer inputBuffer, Buffer tmpOutputBuffer) throws SSLException
- Throws:
SSLException
-
handshakeWrap
public static Buffer handshakeWrap(Connection connection, SSLConnectionContext sslCtx, Buffer netBuffer) throws SSLException
- Throws:
SSLException
-
allocateInputBuffer
public static Buffer allocateInputBuffer(SSLConnectionContext sslCtx)
-
-