Modifier and Type | Field and Description |
---|---|
protected boolean |
clientMode
Client mode when handshaking.
|
protected String[] |
enabledCipherSuites
The list of cipher suite
|
protected String[] |
enabledProtocols
the list of protocols
|
protected boolean |
needClientAuth
Require client Authentication.
|
protected SSLContext |
sslContext |
protected SSLContextConfigurator |
sslContextConfiguration |
protected boolean |
wantClientAuth
True when requesting authentication.
|
Modifier | Constructor and Description |
---|---|
protected |
SSLEngineConfigurator() |
|
SSLEngineConfigurator(SSLContext sslContext)
Create SSL Engine configuration basing on passed
SSLContext . |
|
SSLEngineConfigurator(SSLContext sslContext,
boolean clientMode,
boolean needClientAuth,
boolean wantClientAuth)
Create SSL Engine configuration basing on passed
SSLContext ,
using passed client mode, need/want client auth parameters. |
|
SSLEngineConfigurator(SSLContextConfigurator sslContextConfiguration)
Create SSL Engine configuration basing on passed
SSLContextConfigurator . |
|
SSLEngineConfigurator(SSLContextConfigurator sslContextConfiguration,
boolean clientMode,
boolean needClientAuth,
boolean wantClientAuth)
Create SSL Engine configuration basing on passed
SSLContextConfigurator . |
|
SSLEngineConfigurator(SSLEngineConfigurator pattern) |
Modifier and Type | Method and Description |
---|---|
SSLEngine |
configure(SSLEngine sslEngine)
Configure passed
SSLEngine , using current configurator settings |
SSLEngineConfigurator |
copy() |
SSLEngine |
createSSLEngine()
Create and configure
SSLEngine using this context configuration. |
SSLEngine |
createSSLEngine(String peerHost,
int peerPort)
Create and configure
SSLEngine using this context configuration
using advisory peer information. |
String[] |
getEnabledCipherSuites() |
String[] |
getEnabledProtocols() |
SSLContext |
getSslContext() |
boolean |
isCipherConfigured() |
boolean |
isClientMode()
Will
SSLEngine be configured to work in client mode. |
boolean |
isNeedClientAuth() |
boolean |
isProtocolConfigured() |
boolean |
isWantClientAuth() |
SSLEngineConfigurator |
setCipherConfigured(boolean isCipherConfigured) |
SSLEngineConfigurator |
setClientMode(boolean clientMode)
Set
SSLEngine to be configured to work in client mode. |
SSLEngineConfigurator |
setEnabledCipherSuites(String[] enabledCipherSuites) |
SSLEngineConfigurator |
setEnabledProtocols(String[] enabledProtocols) |
SSLEngineConfigurator |
setNeedClientAuth(boolean needClientAuth) |
SSLEngineConfigurator |
setProtocolConfigured(boolean isProtocolConfigured) |
SSLEngineConfigurator |
setWantClientAuth(boolean wantClientAuth) |
String |
toString() |
protected volatile SSLContextConfigurator sslContextConfiguration
protected volatile SSLContext sslContext
protected String[] enabledCipherSuites
protected String[] enabledProtocols
protected boolean clientMode
protected boolean needClientAuth
protected boolean wantClientAuth
public SSLEngineConfigurator(SSLContext sslContext)
SSLContext
.sslContext
- SSLContext
.public SSLEngineConfigurator(SSLContext sslContext, boolean clientMode, boolean needClientAuth, boolean wantClientAuth)
SSLContext
,
using passed client mode, need/want client auth parameters.sslContext
- SSLContext
.clientMode
- needClientAuth
- wantClientAuth
- public SSLEngineConfigurator(SSLContextConfigurator sslContextConfiguration)
SSLContextConfigurator
.
This constructor makes possible to initialize SSLEngine and SSLContext in lazy
fashion on first createSSLEngine()
call.sslContextConfiguration
- SSLContextConfigurator
.public SSLEngineConfigurator(SSLContextConfigurator sslContextConfiguration, boolean clientMode, boolean needClientAuth, boolean wantClientAuth)
SSLContextConfigurator
.
This constructor makes possible to initialize SSLEngine and SSLContext in lazy
fashion on first createSSLEngine()
call.sslContextConfiguration
- SSLContextConfigurator
.clientMode
- needClientAuth
- wantClientAuth
- public SSLEngineConfigurator(SSLEngineConfigurator pattern)
protected SSLEngineConfigurator()
public SSLEngine createSSLEngine()
SSLEngine
using this context configuration.SSLEngine
.public SSLEngine createSSLEngine(String peerHost, int peerPort)
SSLEngine
using this context configuration
using advisory peer information.
Applications using this factory method are providing hints for an internal session reuse strategy.
Some cipher suites (such as Kerberos) require remote hostname information, in which case peerHost needs to be specified.
peerHost
- the non-authoritative name of the hostpeerPort
- the non-authoritative portSSLEngine
.public SSLEngine configure(SSLEngine sslEngine)
SSLEngine
, using current configurator settingspublic boolean isClientMode()
SSLEngine
be configured to work in client mode.SSLEngine
will be configured to work
in client mode, or false for server mode.public SSLEngineConfigurator setClientMode(boolean clientMode)
SSLEngine
to be configured to work in client mode.clientMode
- true, if SSLEngine
will be configured
to work in client mode, or false for server
mode.public boolean isNeedClientAuth()
public SSLEngineConfigurator setNeedClientAuth(boolean needClientAuth)
public boolean isWantClientAuth()
public SSLEngineConfigurator setWantClientAuth(boolean wantClientAuth)
public String[] getEnabledCipherSuites()
public SSLEngineConfigurator setEnabledCipherSuites(String[] enabledCipherSuites)
public String[] getEnabledProtocols()
public SSLEngineConfigurator setEnabledProtocols(String[] enabledProtocols)
public boolean isCipherConfigured()
public SSLEngineConfigurator setCipherConfigured(boolean isCipherConfigured)
public boolean isProtocolConfigured()
public SSLEngineConfigurator setProtocolConfigured(boolean isProtocolConfigured)
public SSLContext getSslContext()
public SSLEngineConfigurator copy()
Copyright © 2015 Oracle Corporation. All rights reserved.