public final class SecureChatSslContextFactory extends Object
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.
SSLEngine.setNeedClientAuth(boolean)
before creating
SslHandler
.SSLContext
on the client side,
specify the KeyManager
that contains the client certificate as
the first argument of SSLContext.init(KeyManager[], TrustManager[], SecureRandom)
.SSLContext
on the server side,
specify the proper TrustManager
as the second argument of
SSLContext.init(KeyManager[], TrustManager[], SecureRandom)
to validate the client certificate.Modifier and Type | Method and Description |
---|---|
static SSLContext |
getClientContext() |
static SSLContext |
getServerContext() |
public static SSLContext getServerContext()
public static SSLContext getClientContext()
Copyright © 2008–2018 The Netty Project. All rights reserved.