From e1036d2023f21a84df665d53ad0bd8f3b07f6fe9 Mon Sep 17 00:00:00 2001 From: Jasper Kamerling Date: Fri, 17 Nov 2023 10:07:19 +0100 Subject: [PATCH] FDP-94: Set host name verifier on connection --- .../application/factories/HttpsUrlConnectionFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/java/org/gxf/soapbridge/application/factories/HttpsUrlConnectionFactory.java b/application/src/main/java/org/gxf/soapbridge/application/factories/HttpsUrlConnectionFactory.java index 087f5e9..b25c9e0 100644 --- a/application/src/main/java/org/gxf/soapbridge/application/factories/HttpsUrlConnectionFactory.java +++ b/application/src/main/java/org/gxf/soapbridge/application/factories/HttpsUrlConnectionFactory.java @@ -71,8 +71,8 @@ public HttpsURLConnection createConnection( return null; } // Create connection. - HttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifierFactory.getHostnameVerifier()); final HttpsURLConnection connection = (HttpsURLConnection) new URL(uri).openConnection(); + connection.setHostnameVerifier(hostnameVerifierFactory.getHostnameVerifier()); connection.setSSLSocketFactory(sslContext.getSocketFactory()); connection.setDoInput(true); connection.setDoOutput(true);