This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git
The following commit(s) were added to refs/heads/master by this push:
new 04c9445f2 Use default hostname verifier for custom REST client SSL
connection
04c9445f2 is described below
commit 04c9445f26b4a48ffe805103250621ac1fcba568
Author: Junkai Xue <[email protected]>
AuthorDate: Mon Aug 24 15:19:26 2026 -0700
Use default hostname verifier for custom REST client SSL connection
Configure the custom REST client's SSLConnectionSocketFactory with the
default hostname verifier instead of a no-op verifier.
---
.../java/org/apache/helix/rest/client/CustomRestClientFactory.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/helix-rest/src/main/java/org/apache/helix/rest/client/CustomRestClientFactory.java
b/helix-rest/src/main/java/org/apache/helix/rest/client/CustomRestClientFactory.java
index 6b6545983..90523f4af 100644
---
a/helix-rest/src/main/java/org/apache/helix/rest/client/CustomRestClientFactory.java
+++
b/helix-rest/src/main/java/org/apache/helix/rest/client/CustomRestClientFactory.java
@@ -25,7 +25,6 @@ import org.apache.helix.rest.server.HelixRestServer;
import org.apache.helix.util.HelixUtil;
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.RequestConfig;
-import org.apache.http.conn.ssl.NoopHostnameVerifier;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.HttpClients;
@@ -60,7 +59,8 @@ public class CustomRestClientFactory {
httpClient =
HttpClients.custom().setSSLContext(HelixRestServer.REST_SERVER_SSL_CONTEXT)
.setSSLSocketFactory(new SSLConnectionSocketFactory(
- HelixRestServer.REST_SERVER_SSL_CONTEXT, new
NoopHostnameVerifier()))
+ HelixRestServer.REST_SERVER_SSL_CONTEXT,
+
SSLConnectionSocketFactory.getDefaultHostnameVerifier()))
.setDefaultRequestConfig(config).build();
} else {
httpClient =
HttpClientBuilder.create().setDefaultRequestConfig(config).build();