java.lang.Object
io.helidon.webserver.WebServerTls
A class wrapping transport layer security (TLS) configuration for
WebServer sockets.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
This constant is a context classifier for the x509 client certificate if it is present. -
Method Summary
Modifier and TypeMethodDescriptionstatic WebServerTls.Builder
builder()
A fluent API builder forWebServerTls
.static WebServerTls
Create TLS configuration from config.boolean
enabled()
Whether this TLS config has security enabled (and the socket is going to be protected by one of the TLS protocols), or no (and the socket is going to be plain).manager()
The Tls manager.boolean
trustAll()
Trust any certificate provided by the other side of communication.
-
Field Details
-
CLIENT_X509_CERTIFICATE
This constant is a context classifier for the x509 client certificate if it is present. Callers may use this constant to lookup the client certificate associated with the current request context.
-
-
Method Details
-
builder
A fluent API builder forWebServerTls
.- Returns:
- a new builder instance
-
create
Create TLS configuration from config.- Parameters:
config
- located on the node of the tls configuration (usually this isssl
)- Returns:
- a new TLS configuration
-
manager
The Tls manager. If one is not explicitly defined in the config then a default manager will be created.- Returns:
- the tls manager of the tls instance
- See Also:
-
trustAll
public boolean trustAll()Trust any certificate provided by the other side of communication.This is a dangerous setting: if set to
true
, any certificate will be accepted, throwing away most of the security advantages of TLS. NEVER do this in production.- Returns:
- whether to trust all certificates, do not use in production
-
enabled
public boolean enabled()Whether this TLS config has security enabled (and the socket is going to be protected by one of the TLS protocols), or no (and the socket is going to be plain).- Returns:
true
if this configuration represents a TLS configuration,false
for plain configuration
-