SslEngineConfigurator.public class SslEngineConfigurator
extends java.lang.Object
Utility class, which helps to configure SSLEngine. Should be passed to client via configuration properties.
Example:
SslContextConfigurator sslContextConfigurator = new SslContextConfigurator();
sslContextConfigurator.setTrustStoreFile("...");
sslContextConfigurator.setTrustStorePassword("...");
sslContextConfigurator.setTrustStoreType("...");
sslContextConfigurator.setKeyStoreFile("...");
sslContextConfigurator.setKeyStorePassword("...");
sslContextConfigurator.setKeyStoreType("...");
SslEngineConfigurator sslEngineConfigurator = new SslEngineConfigurator(sslContextConfigurator, true, false,
false);
client.getProperties().put(ClientManager.SSL_ENGINE_CONFIGURATOR, sslEngineConfigurator);
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
clientMode
Deprecated.
Client mode when handshaking.
|
protected java.lang.String[] |
enabledCipherSuites
Deprecated.
The list of cipher suites.
|
protected java.lang.String[] |
enabledProtocols
Deprecated.
The list of protocols.
|
protected boolean |
needClientAuth
Deprecated.
Require client Authentication.
|
protected javax.net.ssl.SSLContext |
sslContext
Deprecated.
|
protected SslContextConfigurator |
sslContextConfiguration
Deprecated.
|
protected boolean |
wantClientAuth
Deprecated.
True when requesting authentication.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SslEngineConfigurator()
Deprecated.
Default constructor.
|
|
SslEngineConfigurator(javax.net.ssl.SSLContext sslContext)
Deprecated.
Create SSL Engine configuration basing on passed
SSLContext. |
|
SslEngineConfigurator(javax.net.ssl.SSLContext sslContext,
boolean clientMode,
boolean needClientAuth,
boolean wantClientAuth)
Deprecated.
Create SSL Engine configuration basing on passed
SSLContext,
using passed client mode, need/want client auth parameters. |
|
SslEngineConfigurator(SslContextConfigurator sslContextConfiguration)
Deprecated.
Create SSL Engine configuration basing on passed
SslContextConfigurator. |
|
SslEngineConfigurator(SslContextConfigurator sslContextConfiguration,
boolean clientMode,
boolean needClientAuth,
boolean wantClientAuth)
Deprecated.
Create SSL Engine configuration basing on passed
SslContextConfigurator. |
|
SslEngineConfigurator(SslEngineConfigurator pattern)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
javax.net.ssl.SSLEngine |
configure(javax.net.ssl.SSLEngine sslEngine)
Deprecated.
Configure passed
SSLEngine, using current configurator settings |
SslEngineConfigurator |
copy()
Deprecated.
|
javax.net.ssl.SSLEngine |
createSSLEngine()
Deprecated.
Create and configure
SSLEngine, basing on current settings. |
java.lang.String[] |
getEnabledCipherSuites()
Deprecated.
|
java.lang.String[] |
getEnabledProtocols()
Deprecated.
|
javax.net.ssl.SSLContext |
getSslContext()
Deprecated.
|
boolean |
isCipherConfigured()
Deprecated.
|
boolean |
isClientMode()
Deprecated.
Will
SSLEngine be configured to work in client mode. |
boolean |
isNeedClientAuth()
Deprecated.
|
boolean |
isProtocolConfigured()
Deprecated.
|
boolean |
isWantClientAuth()
Deprecated.
|
SslEngineConfigurator |
setCipherConfigured(boolean isCipherConfigured)
Deprecated.
|
SslEngineConfigurator |
setClientMode(boolean clientMode)
Deprecated.
Set
SSLEngine to be configured to work in client mode. |
SslEngineConfigurator |
setEnabledCipherSuites(java.lang.String[] enabledCipherSuites)
Deprecated.
|
SslEngineConfigurator |
setEnabledProtocols(java.lang.String[] enabledProtocols)
Deprecated.
|
SslEngineConfigurator |
setNeedClientAuth(boolean needClientAuth)
Deprecated.
|
SslEngineConfigurator |
setProtocolConfigured(boolean isProtocolConfigured)
Deprecated.
|
SslEngineConfigurator |
setWantClientAuth(boolean wantClientAuth)
Deprecated.
|
java.lang.String |
toString()
Deprecated.
|
protected volatile SslContextConfigurator sslContextConfiguration
protected volatile javax.net.ssl.SSLContext sslContext
protected java.lang.String[] enabledCipherSuites
protected java.lang.String[] enabledProtocols
protected boolean clientMode
protected boolean needClientAuth
protected boolean wantClientAuth
public SslEngineConfigurator(javax.net.ssl.SSLContext sslContext)
SSLContext.sslContext - SSLContext.public SslEngineConfigurator(javax.net.ssl.SSLContext sslContext,
boolean clientMode,
boolean needClientAuth,
boolean wantClientAuth)
SSLContext,
using passed client mode, need/want client auth parameters.sslContext - SSLContext.clientMode - will be configured to work in client mode.needClientAuth - client authentication is required.wantClientAuth - client should authenticate.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 - will be configured to work in client mode.needClientAuth - client authentication is required.wantClientAuth - client should authenticate.public SslEngineConfigurator(SslEngineConfigurator pattern)
protected SslEngineConfigurator()
public javax.net.ssl.SSLEngine createSSLEngine()
SSLEngine, basing on current settings.SSLEngine.public javax.net.ssl.SSLEngine configure(javax.net.ssl.SSLEngine sslEngine)
SSLEngine, using current configurator settingssslEngine - SSLEngine to configure.SSLEngine.public 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 java.lang.String[] getEnabledCipherSuites()
public SslEngineConfigurator setEnabledCipherSuites(java.lang.String[] enabledCipherSuites)
public java.lang.String[] getEnabledProtocols()
public SslEngineConfigurator setEnabledProtocols(java.lang.String[] enabledProtocols)
public boolean isCipherConfigured()
public SslEngineConfigurator setCipherConfigured(boolean isCipherConfigured)
public boolean isProtocolConfigured()
public SslEngineConfigurator setProtocolConfigured(boolean isProtocolConfigured)
public javax.net.ssl.SSLContext getSslContext()
public java.lang.String toString()
toString in class java.lang.Objectpublic SslEngineConfigurator copy()
Copyright © 2012–2020 Oracle Corporation. All rights reserved.