You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2017/03/28 18:54:41 UTC
[jira] [Resolved] (HTTPCLIENT-1836)
DefaultHostnameVerifier#getSubjectAltNames(X509Certificate) throws
java.lang.ClassCastException
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Gregory resolved HTTPCLIENT-1836.
--------------------------------------
Resolution: Fixed
Fix Version/s: 5.0 Alpha2
4.6 Alpha1
4.5.4
Fix for CCE is in trunk and branches. Please verify and close.
> DefaultHostnameVerifier#getSubjectAltNames(X509Certificate) throws java.lang.ClassCastException
> -----------------------------------------------------------------------------------------------
>
> Key: HTTPCLIENT-1836
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1836
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient (classic)
> Affects Versions: 4.5.3, 5.0 Alpha1
> Reporter: Ilian Iliev
> Priority: Minor
> Fix For: 4.5.4, 4.6 Alpha1, 5.0 Alpha2
>
>
> After upgrade to HttpClient 4.5.3, all of a sudden I started to receive the following exception in one of my projects:
> java.lang.ClassCastException: [B cannot be cast to java.lang.String
> The exception is thrown in DefaultHostnameVerifier#getSubjectAltNames() method, on line 309:
> final String s = (String) entry.get(1);
> The code above assumes that each entry is either a String or something castable to String. However, according to Javadoc documentation of X509Certificate.getSubjectAlternativeNames(), it can be a byte array containing ASN.1 DER encoded value. Attempt to cast this byte array to String is throwing java.lang.ClassCastException.
> Seems to be a regression introduced in version 4.5.3 with the fix for HTTPCLIENT-1802
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org