sslContextConsumer);
diff --git a/webserver/webserver/src/main/java/io/helidon/webserver/WebServerTls.java b/webserver/webserver/src/main/java/io/helidon/webserver/WebServerTls.java
index d0c899fb063..5057c774fe8 100644
--- a/webserver/webserver/src/main/java/io/helidon/webserver/WebServerTls.java
+++ b/webserver/webserver/src/main/java/io/helidon/webserver/WebServerTls.java
@@ -106,6 +106,18 @@ public TlsManager manager() {
return tlsManager;
}
+ /**
+ * Trust any certificate provided by the other side of communication.
+ *
+ * This is a dangerous setting: if set to {@code true}, any certificate will be accepted, throwing away
+ * most of the security advantages of TLS. NEVER do this in production.
+ *
+ * @return whether to trust all certificates, do not use in production
+ */
+ public boolean trustAll() {
+ return trustAll;
+ }
+
Collection enabledTlsProtocols() {
return enabledTlsProtocols;
}
@@ -122,10 +134,6 @@ SSLContext sslContext() {
return manager().sslContext();
}
- boolean trustAll() {
- return trustAll;
- }
-
KeyConfig privateKeyConfig() {
return privateKeyConfig;
}
@@ -259,6 +267,7 @@ public Builder config(Config config) {
*/
@ConfiguredOption(provider = true)
public Builder tlsManager(TlsManager tlsManager) {
+ this.enabled = true;
this.tlsManager = Objects.requireNonNull(tlsManager);
return this;
}