summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2022-02-01 14:56:56 +0000
committerArne H Juul <arnej@yahooinc.com>2022-02-01 14:56:56 +0000
commit1a334915c7e50dc8f6f9a2fa7a7d524cacb7efb2 (patch)
treee40d621715860015a3e3bb8d0c56df076511f58a
parentc58ca3fc3a6ea6284d6ffcc7807a923a106e3246 (diff)
provide TlsDetailsFactory
-rw-r--r--vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/ApacheCluster.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/ApacheCluster.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/ApacheCluster.java
index 1874bd42e16..b51210d22ea 100644
--- a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/ApacheCluster.java
+++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/ApacheCluster.java
@@ -16,6 +16,10 @@ import org.apache.hc.core5.net.URIAuthority;
import org.apache.hc.core5.reactor.IOReactorConfig;
import org.apache.hc.core5.util.Timeout;
+import org.apache.hc.core5.function.Factory;
+import org.apache.hc.core5.reactor.ssl.TlsDetails;
+import javax.net.ssl.SSLEngine;
+
import javax.net.ssl.SSLContext;
import java.io.IOException;
import java.net.URI;
@@ -132,6 +136,8 @@ class ApacheCluster implements Cluster {
throw new IllegalStateException("No adequate SSL cipher suites supported by the JVM");
ClientTlsStrategyBuilder tlsStrategyBuilder = ClientTlsStrategyBuilder.create()
+ .setTlsDetailsFactory(sslEngine ->
+ new TlsDetails(sslEngine.getSession(), sslEngine.getApplicationProtocol()))
.setCiphers(allowedCiphers)
.setSslContext(sslContext);
if (builder.hostnameVerifier != null)