org.glassfish.grizzly.ssl
Class SSLUtils

java.lang.Object
  extended by org.glassfish.grizzly.ssl.SSLUtils

public class SSLUtils
extends java.lang.Object

Utility class, which implements the set of useful SSL related operations.

Author:
Alexey Stashok

Field Summary
static java.lang.String SSL_ENGINE_ATTR_NAME
           
static Attribute<javax.net.ssl.SSLEngine> sslEngineAttribute
           
 
Constructor Summary
SSLUtils()
           
 
Method Summary
static void executeDelegatedTask(javax.net.ssl.SSLEngine sslEngine)
          Complete handshakes operations.
static javax.net.ssl.SSLEngine getSSLEngine(AttributeStorage storage)
           
static int getSSLPacketSize(Buffer buf)
           
static javax.net.ssl.SSLEngineResult handshakeUnwrap(Connection connection, javax.net.ssl.SSLEngine sslEngine, Buffer inputBuffer)
           
static Buffer handshakeWrap(Connection connection, javax.net.ssl.SSLEngine sslEngine)
           
static boolean isHandshaking(javax.net.ssl.SSLEngine sslEngine)
           
static void setSSLEngine(AttributeStorage storage, javax.net.ssl.SSLEngine sslEngine)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SSL_ENGINE_ATTR_NAME

public static final java.lang.String SSL_ENGINE_ATTR_NAME
See Also:
Constant Field Values

sslEngineAttribute

public static final Attribute<javax.net.ssl.SSLEngine> sslEngineAttribute
Constructor Detail

SSLUtils

public SSLUtils()
Method Detail

getSSLEngine

public static javax.net.ssl.SSLEngine getSSLEngine(AttributeStorage storage)

setSSLEngine

public static void setSSLEngine(AttributeStorage storage,
                                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(Connection connection,
                                                            javax.net.ssl.SSLEngine sslEngine,
                                                            Buffer inputBuffer)
                                                     throws javax.net.ssl.SSLException
Throws:
javax.net.ssl.SSLException

handshakeWrap

public static Buffer handshakeWrap(Connection connection,
                                   javax.net.ssl.SSLEngine sslEngine)
                            throws javax.net.ssl.SSLException
Throws:
javax.net.ssl.SSLException


Copyright © 2011 Oracle Corpration. All Rights Reserved.