Package org.glassfish.grizzly.ssl
Class SSLUtils
- java.lang.Object
-
- org.glassfish.grizzly.ssl.SSLUtils
-
public final class SSLUtils extends java.lang.ObjectUtility 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(javax.net.ssl.SSLEngine sslEngine)Complete handshakes operations.static SSLConnectionContextgetSslConnectionContext(Connection connection)static javax.net.ssl.SSLEnginegetSSLEngine(Connection connection)static intgetSSLPacketSize(Buffer buf)static javax.net.ssl.SSLEngineResulthandshakeUnwrap(int length, SSLConnectionContext sslCtx, Buffer inputBuffer, Buffer tmpOutputBuffer)static BufferhandshakeWrap(Connection connection, SSLConnectionContext sslCtx, Buffer netBuffer)static booleanisHandshaking(javax.net.ssl.SSLEngine sslEngine)static voidsetSSLEngine(Connection connection, javax.net.ssl.SSLEngine sslEngine)
-
-
-
Method Detail
-
getSslConnectionContext
public static SSLConnectionContext getSslConnectionContext(Connection connection)
-
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
-
handshakeWrap
public static Buffer handshakeWrap(Connection connection, SSLConnectionContext sslCtx, Buffer netBuffer) throws javax.net.ssl.SSLException
- Throws:
javax.net.ssl.SSLException
-
allocateInputBuffer
public static Buffer allocateInputBuffer(SSLConnectionContext sslCtx)
-
-