java.lang.Object
io.helidon.common.tls.Tls
- All Implemented Interfaces:
io.helidon.builder.api.RuntimeType.Api<TlsConfig>
TLS configuration - common for server and client.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic TlsConfig.Builderbuilder()A new fluent API builder.static TlsCreate TLS configuration from config.static TlsCreate TLS with custom configuration.static Tlscreate(Consumer<TlsConfig.Builder> consumer) Create TLS customizing its configuration.Create a TLS socket for a server.createSocket(List<String> alpnProtocols, Socket socket, InetSocketAddress address) Create a SSLSocket for the chosen protocol and the given socket.booleanenabled()Whether this TLS configuration is enabled or not.booleaninthashCode()final SSLEngineSSL engine from this configuration.voidReload reloadableTlsReloadableComponents with the new configuration.Provides the SSL context.SSL parameters.
-
Field Details
-
ENDPOINT_IDENTIFICATION_HTTPS
HTTPS endpoint identification algorithm, verifies certificate cn against host name.- See Also:
-
ENDPOINT_IDENTIFICATION_NONE
Disable host name verification.- See Also:
-
-
Method Details
-
builder
A new fluent API builder.- Returns:
- builder
-
create
Create TLS configuration from config.- Parameters:
config- located on the node of the tls configuration (usually this isssl)- Returns:
- a new TLS configuration
-
create
Create TLS with custom configuration.- Parameters:
tlsConfig- TLS configuration- Returns:
- a new TLS instance
-
create
Create TLS customizing its configuration.- Parameters:
consumer- configuration builder consumer- Returns:
- a new TLS instance
-
prototype
- Specified by:
prototypein interfaceio.helidon.builder.api.RuntimeType.Api<TlsConfig>
-
newEngine
SSL engine from this configuration.- Returns:
- SSL Engine
-
hashCode
public int hashCode() -
equals
-
createServerSocket
Create a TLS socket for a server.- Returns:
- a new server socket ready for TLS communication
-
createSocket
Create a SSLSocket for the chosen protocol and the given socket.- Parameters:
alpnProtocols- protocol(s) to use (order is significant)socket- existing socketaddress- where SSL socket will connect- Returns:
- a new socket ready for TLS communication
-
sslContext
Provides the SSL context.- Returns:
- SSL context
-
sslParameters
SSL parameters.- Returns:
- SSL parameters
-
reload
Reload reloadableTlsReloadableComponents with the new configuration.- Parameters:
tls- new TLS configuration
-
enabled
public boolean enabled()Whether this TLS configuration is enabled or not.- Returns:
- whether TLS is enabled
-