java.lang.Object
io.helidon.common.tls.Tls
- All Implemented Interfaces:
RuntimeType.Api<TlsConfig>
TLS configuration - common for server and client.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TlsConfig.Builder
builder()
A new fluent API builder.static Tls
Create TLS configuration from config.static Tls
Create TLS with custom configuration.static Tls
create
(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.boolean
enabled()
Whether this TLS configuration is enabled or not.boolean
int
hashCode()
final SSLEngine
SSL engine from this configuration.The prototype as it was received when creating this runtime object instance.void
Reload reloadableTlsReloadableComponent
s 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
Description copied from interface:RuntimeType.Api
The prototype as it was received when creating this runtime object instance.- Specified by:
prototype
in interfaceRuntimeType.Api<TlsConfig>
- Returns:
- prototype object used to create this instance
-
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 reloadableTlsReloadableComponent
s 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
-