diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index bad7269e1..af97b5e92 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -19,6 +19,12 @@ Changelog: * [HTTPCLIENT-1817] Add a "Trust All" TrustStrategy implementation. Contributed by Gary Gregory +* [HTTPCLIENT-1817] Add a "Trust All" TrustStrategy implementation. + Contributed by Gary Gregory + +* [HTTPCLIENT-1836] DefaultHostnameVerifier#getSubjectAltNames(X509Certificate) throws java.lang.ClassCastException. + Contributed by Gary Gregory , Ilian Iliev + Release 5.0-ALPHA1 ------------------- diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java index 8a09ff474..d4bbe0e71 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java @@ -303,8 +303,12 @@ public final class DefaultHostnameVerifier implements HttpClientHostnameVerifier for (final List entry : entries) { final Integer type = entry.size() >= 2 ? (Integer) entry.get(0) : null; if (type != null) { - final String s = (String) entry.get(1); - result.add(new SubjectName(s, type)); + final Object o = entry.get(1); + if (o instanceof String) { + result.add(new SubjectName((String) o, type.intValue())); + } else if (o instanceof byte[]) { + // TODO ASN.1 DER encoded form + } } } return result;