You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2021/01/28 16:06:12 UTC
[cxf] branch 3.4.x-fixes updated: [CXF-8415]DefaultHostnameVerifier
fails with HttpCore NIO
This is an automated email from the ASF dual-hosted git repository.
ffang pushed a commit to branch 3.4.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/3.4.x-fixes by this push:
new 24202fc [CXF-8415]DefaultHostnameVerifier fails with HttpCore NIO
24202fc is described below
commit 24202fc3c46b7faa4d2776e6eb4e51488b8eefb7
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Thu Jan 28 11:04:31 2021 -0500
[CXF-8415]DefaultHostnameVerifier fails with HttpCore NIO
(cherry picked from commit 3a22718d6ce69d01d860a73f3eaf4bc7c658d2b6)
---
.../java/org/apache/cxf/transport/https/AllowAllHostnameVerifier.java | 2 +-
.../apache/cxf/transport/https/httpclient/DefaultHostnameVerifier.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/https/AllowAllHostnameVerifier.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/https/AllowAllHostnameVerifier.java
index bde0d14..d14dd07 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/https/AllowAllHostnameVerifier.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/https/AllowAllHostnameVerifier.java
@@ -45,7 +45,7 @@ class AllowAllHostnameVerifier implements javax.net.ssl.HostnameVerifier {
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, e.getMessage(), e);
}
- throw new RuntimeException("HostnameVerifier, socket reset for TTL");
+ return false;
}
}
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/https/httpclient/DefaultHostnameVerifier.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/https/httpclient/DefaultHostnameVerifier.java
index 58ad20d..335c71d 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/https/httpclient/DefaultHostnameVerifier.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/https/httpclient/DefaultHostnameVerifier.java
@@ -95,7 +95,7 @@ public final class DefaultHostnameVerifier implements HostnameVerifier {
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, ex.getMessage(), ex);
}
- throw new RuntimeException("HostnameVerifier, socket reset for TTL");
+ return false;
}
}