hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1789187 - in /httpcomponents/httpclient/branches/4.6.x: RELEASE_NOTES.txt httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java
Date Tue, 28 Mar 2017 18:49:01 GMT
Author: ggregory
Date: Tue Mar 28 18:49:01 2017
New Revision: 1789187

URL: http://svn.apache.org/viewvc?rev=1789187&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/branches/4.6.x/RELEASE_NOTES.txt
    httpcomponents/httpclient/branches/4.6.x/httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java

Modified: httpcomponents/httpclient/branches/4.6.x/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.6.x/RELEASE_NOTES.txt?rev=1789187&r1=1789186&r2=1789187&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.6.x/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/branches/4.6.x/RELEASE_NOTES.txt Tue Mar 28 18:49:01 2017
@@ -23,6 +23,9 @@ Change log:
 * [HTTPCLIENT-1828] HttpDelete, HttpGet, HttpHead do not extend HttpEntityEnclosingRequestBase.
   Contributed by Saravanakumar Selvaraj <saravanakumar dot java at gmail dot com> and
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 4.5.3
 -------------------

Modified: httpcomponents/httpclient/branches/4.6.x/httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.6.x/httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java?rev=1789187&r1=1789186&r2=1789187&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.6.x/httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java
(original)
+++ httpcomponents/httpclient/branches/4.6.x/httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java
Tue Mar 28 18:49:01 2017
@@ -305,8 +305,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