| Modifier and Type | Method and Description |
|---|---|
SSLEngine |
build()
Builds a new
SSLEngine instance based on the current configuration
settings. |
SSLEngine |
build(String peerHost,
int peerPort)
Builds a new
SSLEngine instance based on the current configuration
settings and advisory peer information. |
SSLEngineBuilder |
cipherFilter(CipherFilter filter)
Configures a filter for cipher suites to enable, or
null to use
the default filter. |
SSLEngineBuilder |
ciphers(String... ciphers)
Configures cipher suites to enable, or
null to enable the
recommended cipher suites. |
SSLEngineBuilder |
clientAuth(ClientAuth clientAuth)
Configures the client authentication mode for a server-side
SSLEngine. |
SSLEngineBuilder |
clone()
Generates a new copy of this builder.
|
SSLContext |
context()
Returns the SSL context used by the builder to create
SSLEngine |
SSLEngineBuilder |
enableRetransmissions(boolean enable)
Configures if DTLS handshake retransmissions should be enabled.
|
static SSLEngineBuilder |
forClient(SSLContext context)
Creates a builder for a client-side
SSLEngine. |
static SSLEngineBuilder |
forServer(SSLContext context)
Creates a builder for a server-side
SSLEngine. |
boolean |
isForClient()
Tells if the builder if for a client-side
SSLEngine. |
boolean |
isForServer()
Tells if the builder if for a server-side
SSLEngine. |
SSLEngineBuilder |
maximumPacketSize(int maxSize)
Configures the maximum expected network packet size.
|
SSLEngineBuilder |
protocolFilter(ProtocolFilter filter)
Configures a filter for protocol versions to enable, or
null to use
the default filter. |
SSLEngineBuilder |
protocols(String... protocols)
Configures protocol versions to enable, or
null to enable the
recommended protocol versions. |
SSLEngineBuilder |
useCiphersOrder(boolean useOrder)
Configures if the local cipher suites preferences should be honored during
SSL/TLS/DTLS handshaking
|
public static SSLEngineBuilder forClient(SSLContext context)
SSLEngine.public static SSLEngineBuilder forServer(SSLContext context)
SSLEngine.public SSLContext context()
SSLEnginepublic boolean isForServer()
SSLEngine.true if the builder if for a server-side SSLEnginepublic boolean isForClient()
SSLEngine.true if the builder if for a client-side SSLEnginepublic SSLEngineBuilder protocols(String... protocols)
null to enable the
recommended protocol versions.protocols - the protocol versionspublic SSLEngineBuilder protocolFilter(ProtocolFilter filter)
null to use
the default filter.filter - the protocol filterpublic SSLEngineBuilder ciphers(String... ciphers)
null to enable the
recommended cipher suites.ciphers - the cipher suitespublic SSLEngineBuilder cipherFilter(CipherFilter filter)
null to use
the default filter.filter - the cipher filterpublic SSLEngineBuilder enableRetransmissions(boolean enable)
NOTE: It requires Java 9 or newer.
enable - true to enable DTLS handshake retransmissions.public SSLEngineBuilder maximumPacketSize(int maxSize)
NOTE: It requires Java 9 or newer.
maxSize - the maximum expected network packet size in bytes, or 0 to use
the default value that is specified by the underlying
implementation.public SSLEngineBuilder useCiphersOrder(boolean useOrder)
useOrder - true to honor the local cipher suites preferencespublic SSLEngineBuilder clientAuth(ClientAuth clientAuth)
SSLEngine.clientAuth - the client authentication mode.public SSLEngine build() throws SSLEngineCreateException
SSLEngine instance based on the current configuration
settings.SSLEngine instance.SSLEngineCreateException - if a failure occurred while building the
SSLEngine instancepublic SSLEngine build(String peerHost, int peerPort) throws SSLEngineCreateException
SSLEngine instance based on the current configuration
settings and advisory peer information.peerHost - the non-authoritative name of the hostpeerPort - the non-authoritative portSSLEngine instance.SSLEngineCreateException - if a failure occurred while building the
SSLEngine instanceSSLContext.createSSLEngine(String, int)public SSLEngineBuilder clone()
Copyright © 2017–2022 SNF4J.ORG. All rights reserved.