hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1789189 - in /httpcomponents/httpclient/trunk: RELEASE_NOTES.txt httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java
Date Tue, 28 Mar 2017 18:53:43 GMT
Author: ggregory
Date: Tue Mar 28 18:53:43 2017
New Revision: 1789189

URL: http://svn.apache.org/viewvc?rev=1789189&view=rev
Log:
[HTTPCLIENT-1836] DefaultHostnameVerifier#getSubjectAltNames(X509Certificate) throws java.lang.ClassCastException.
  Contributed by Gary Gregory <ggregory at apache.org>, Ilian Iliev <ilian_iliev
at yahoo.com>

Modified:
    httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
    httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java

Modified: httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/RELEASE_NOTES.txt?rev=1789189&r1=1789188&r2=1789189&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/trunk/RELEASE_NOTES.txt Tue Mar 28 18:53:43 2017
@@ -19,6 +19,12 @@ Changelog:
 * [HTTPCLIENT-1817] Add a "Trust All" TrustStrategy implementation.
   Contributed by Gary Gregory <ggregory at apache.org>
 
+* [HTTPCLIENT-1817] Add a "Trust All" TrustStrategy implementation.
+  Contributed by Gary Gregory <ggregory at apache.org>
+
+* [HTTPCLIENT-1836] DefaultHostnameVerifier#getSubjectAltNames(X509Certificate) throws java.lang.ClassCastException.
+  Contributed by Gary Gregory <ggregory at apache.org>, Ilian Iliev <ilian_iliev
at yahoo.com>
+
 Release 5.0-ALPHA1
 -------------------
 

Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java?rev=1789189&r1=1789188&r2=1789189&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java
Tue Mar 28 18:53:43 2017
@@ -303,8 +303,12 @@ public final class DefaultHostnameVerifi
             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;



Mime
View raw message