kipedia.org/wiki/Transport_Layer_Security">SSL · TLS and StartTLS support to a {@link Channel}. Please refer to the
"SecureChat" example in the distribution or the web site for the detailed usage.
Beginning the handshake
A user should make sure not to write a message while the {@linkplain #handshake(Channel) handshake} is in progress unless it is arenegotiation. You will be notified by the {@link ChannelFuture} which isreturned by the {@link #handshake(Channel)} method when the handshakeprocess succeeds or fails.
Renegotiation
Once the initial handshake is done successfully. You can always call {@link #handshake(Channel)} again to renegotiate the SSL session parameters.
Closing the session
To close the SSL session, the {@link #close(Channel)} method should becalled to send the {@code close_notify} message to the remote peer. Oneexception is when you close the {@link Channel} - {@link SslHandler}intercepts the close request and send the {@code close_notify} messagebefore the channel closure automatically. Once the SSL session is closed, it is not reusable, and consequently you should create a new {@link SslHandler} with a new {@link SSLEngine} as explained in thefollowing section.
Restarting the session
To restart the SSL session, you must remove the existing closed {@link SslHandler} from the {@link ChannelPipeline}, insert a new {@link SslHandler} with a new {@link SSLEngine} into the pipeline,and start the handshake process as described in the first section.
@author The Netty Project (netty-dev@lists.jboss.org)
@author Trustin Lee (tlee@redhat.com)
@version $Rev: 981 $, $Date: 2009-03-04 23:11:54 +0900 (Wed, 04 Mar 2009) $
@apiviz.landmark
@apiviz.uses org.jboss.netty.handler.ssl.SslBufferPool