Creates a bogus SSLContext. A client-side context created by this
factory accepts any certificate even if it is invalid. A server-side context
created by this factory sends a bogus certificate defined in
SecureChatKeyStore.
You will have to create your context differently in a real world application.
Client Certificate Authentication
To enable client certificate authentication:
Enable client authentication on the server side by calling
SSLEngine#setNeedClientAuth(boolean) before creating
SslHandler.
When initializing an SSLContext on the client side, specify the
KeyManager that contains the client certificate as the first argument
of
SSLContext#init(KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom)
.
When initializing an SSLContext on the server side, specify the
proper TrustManager as the second argument of
SSLContext#init(KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom)
to validate the client certificate.
Creates a bogus
SSLContext. A client-side context created by this factory accepts any certificate even if it is invalid. A server-side context created by this factory sends a bogus certificate defined inSecureChatKeyStore.You will have to create your context differently in a real world application.
Client Certificate Authentication
To enable client certificate authentication:
SSLEngine#setNeedClientAuth(boolean)before creatingSslHandler.SSLContexton the client side, specify theKeyManagerthat contains the client certificate as the first argument ofSSLContext#init(KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom).SSLContexton the server side, specify the properTrustManageras the second argument ofSSLContext#init(KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom)to validate the client certificate.Rev: 2080 , Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010)