You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Julius Davies (JIRA)" <ji...@apache.org> on 2006/12/06 05:26:21 UTC
[jira] Created: (HTTPCLIENT-613) https should check CN of x509 cert
https should check CN of x509 cert
----------------------------------
Key: HTTPCLIENT-613
URL: http://issues.apache.org/jira/browse/HTTPCLIENT-613
Project: HttpComponents HttpClient
Issue Type: Bug
Components: HttpClient
Affects Versions: Nightly Builds
Reporter: Julius Davies
Priority: Critical
https should check CN of x509 cert
Since we're essentially rolling our own "HttpsURLConnection", the checking provided by "javax.net.ssl.HostnameVerifier" is no longer in place.
I have a patch I'm about to attach which caused both createSocket() methods on o.a.h.conn.ssl.SSLSocketFactory to blowup:
test1: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
test2: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
Hopefully people agree that this is desirable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Updated: (HTTPCLIENT-613) https should check CN of x509 cert
Posted by "Julius Davies (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HTTPCLIENT-613?page=all ]
Julius Davies updated HTTPCLIENT-613:
-------------------------------------
Attachment: SSLSocketFactory_best.patch
- I think this one is the best patch.
- Okay, it's my first substantial patch to an apache project. I'm excited and I've gone insane.
- Improved comments even more.
- Attempted to deal with the [*.co.uk] wildcard problem. I think I've taken a decent first stab at the problem.
> https should check CN of x509 cert
> ----------------------------------
>
> Key: HTTPCLIENT-613
> URL: http://issues.apache.org/jira/browse/HTTPCLIENT-613
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: Nightly Builds
> Reporter: Julius Davies
> Priority: Critical
> Fix For: 4.0 Alpha 1
>
> Attachments: SSLSocketFactory.patch, SSLSocketFactory_best.patch, SSLSocketFactory_improved.patch
>
>
> https should check CN of x509 cert
> Since we're essentially rolling our own "HttpsURLConnection", the checking provided by "javax.net.ssl.HostnameVerifier" is no longer in place.
> I have a patch I'm about to attach which caused both createSocket() methods on o.a.h.conn.ssl.SSLSocketFactory to blowup:
> test1: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> test2: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> Hopefully people agree that this is desirable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Commented: (HTTPCLIENT-613) https should check CN of x509
cert
Posted by "Martin van den Bemt (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HTTPCLIENT-613?page=comments#action_12456912 ]
Martin van den Bemt commented on HTTPCLIENT-613:
------------------------------------------------
Sorry for the noise.. Completely missed issue 614..
> https should check CN of x509 cert
> ----------------------------------
>
> Key: HTTPCLIENT-613
> URL: http://issues.apache.org/jira/browse/HTTPCLIENT-613
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: Nightly Builds
> Reporter: Julius Davies
> Priority: Critical
> Fix For: 4.0 Alpha 1
>
> Attachments: SSLSocketFactory.patch, SSLSocketFactory_best.patch, SSLSocketFactory_improved.patch
>
>
> https should check CN of x509 cert
> Since we're essentially rolling our own "HttpsURLConnection", the checking provided by "javax.net.ssl.HostnameVerifier" is no longer in place.
> I have a patch I'm about to attach which caused both createSocket() methods on o.a.h.conn.ssl.SSLSocketFactory to blowup:
> test1: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> test2: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> Hopefully people agree that this is desirable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Commented: (HTTPCLIENT-613) https should check CN of x509
cert
Posted by "Julius Davies (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HTTPCLIENT-613?page=comments#action_12456616 ]
Julius Davies commented on HTTPCLIENT-613:
------------------------------------------
To account for a problem with IBM 1.4.x JVM's, I think we should also test against sslSocket.getSession() being null. If it is null, we should try to get the socket to blowup by calling socket.getInputStream().available().
SSLSocket ssl = (SSLSocket) s;
SSLSession session = ssl.getSession();
if ( session == null ) {
// In our experience this only happens under IBM 1.4.x.
// hopefully this will unearth the real problem:
ssl.getInputStream().available();
}
[Not sure how to deal with this 2nd patch. Do I upload a new patch containing both fixes? Sorry I'm such a newb!]
Here's some background info:
The IBM 1.4.x JVM, when acting as an SSL client, is quite picky about the certificate chain that the server presents. If the server includes some stray certificates in the chain, IBM will blowup.
But it takes a little while to blowup:
SSLSocket s = factory.createSocket( host, port );
// okay, we're still okay
SSLSession session = s.getSession();
// still okay! No exceptions thrown! But session is null. Uh oh.
InputStream in = s.getInputStream();
// Still no exceptions thrown! Wow, IBM is a survivor.
in.available();
// ! * BOOM * !
javax.net.ssl.SSLHandshakeException: bad certificate
at com.ibm.jsse.bv.a(Unknown Source)
at com.ibm.jsse.a.a(Unknown Source)
at com.ibm.jsse.a.available(Unknown Source)
> https should check CN of x509 cert
> ----------------------------------
>
> Key: HTTPCLIENT-613
> URL: http://issues.apache.org/jira/browse/HTTPCLIENT-613
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: Nightly Builds
> Reporter: Julius Davies
> Priority: Critical
> Fix For: 4.0 Alpha 1
>
> Attachments: SSLSocketFactory.patch
>
>
> https should check CN of x509 cert
> Since we're essentially rolling our own "HttpsURLConnection", the checking provided by "javax.net.ssl.HostnameVerifier" is no longer in place.
> I have a patch I'm about to attach which caused both createSocket() methods on o.a.h.conn.ssl.SSLSocketFactory to blowup:
> test1: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> test2: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> Hopefully people agree that this is desirable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Commented: (HTTPCLIENT-613) https should check CN of x509
cert
Posted by "Martin van den Bemt (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HTTPCLIENT-613?page=comments#action_12456897 ]
Martin van den Bemt commented on HTTPCLIENT-613:
------------------------------------------------
// The CN better have at least two dots if it wants wildcard action.
+ // (Hmmm... what about *.co.uk ??? Eeek! Something to think about
+ // on a rainy day, I guess.)
According to your code.. If I am not mistaken .co.uk contains at least 2 dots...
And officially (just had to deal with that issue), you need a wildcard certificate for every subdomain so :
*.apache.org is a wildcard cerficiate for hostname.apache.org (just that level).
If you want to have a valid certifacate for eg subhostname.hostname.apache.org, you need to get a *.subhostname.hostname.apache.org certificate for that seperately (although browsers seem to accept this stuff).
I chose to have an hostname verifier setup that accepts above, but that is just used for staging and test environments (to prevent us from buyin a huge load of certificates)
HTH..
Mvgr,
Martin
> https should check CN of x509 cert
> ----------------------------------
>
> Key: HTTPCLIENT-613
> URL: http://issues.apache.org/jira/browse/HTTPCLIENT-613
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: Nightly Builds
> Reporter: Julius Davies
> Priority: Critical
> Fix For: 4.0 Alpha 1
>
> Attachments: SSLSocketFactory.patch, SSLSocketFactory_best.patch, SSLSocketFactory_improved.patch
>
>
> https should check CN of x509 cert
> Since we're essentially rolling our own "HttpsURLConnection", the checking provided by "javax.net.ssl.HostnameVerifier" is no longer in place.
> I have a patch I'm about to attach which caused both createSocket() methods on o.a.h.conn.ssl.SSLSocketFactory to blowup:
> test1: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> test2: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> Hopefully people agree that this is desirable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Commented: (HTTPCLIENT-613) https should check CN of x509
cert
Posted by "Julius Davies (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HTTPCLIENT-613?page=comments#action_12456908 ]
Julius Davies commented on HTTPCLIENT-613:
------------------------------------------
HTTPCLIENT-614 will try to address Martin's concerns.
This wiki entry has an interesting catalog of browser behaviour:
http://wiki.cacert.org/wiki/WildcardCertificates
- IE6 doesn't allow subdomains (so follows the RFC). *.apache.org does not match "a.b.apache.org".
- Firefox/Mozilla allows subdomains (breaks RFC). *.apache.org DOES MATCH "a.b.apache.org"!
- New versions of Konqueror (so Safari too?) allows subdomains (breaks RFC).
- Operat allows subdomains (breaks RFC).
I think I'll do some experimentation on my own and test some additional clients. I'll add my findings to cacert's very handy wiki! Curious about the following (but I'm lazy so I'm just going to stick to Linux):
- wget
- curl
- java.net.URL on the following:
1. Sun Java 1.3.1 + JSSE
2. Sun Java 1.4.2
3. Sun Java 5.0
4. Sun Java 6.0
5. IBM Java 1.4.2
6. IBM Java 5.0
7. JRockit Java 1.4.2
8. JRockit Java 5.0
> https should check CN of x509 cert
> ----------------------------------
>
> Key: HTTPCLIENT-613
> URL: http://issues.apache.org/jira/browse/HTTPCLIENT-613
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: Nightly Builds
> Reporter: Julius Davies
> Priority: Critical
> Fix For: 4.0 Alpha 1
>
> Attachments: SSLSocketFactory.patch, SSLSocketFactory_best.patch, SSLSocketFactory_improved.patch
>
>
> https should check CN of x509 cert
> Since we're essentially rolling our own "HttpsURLConnection", the checking provided by "javax.net.ssl.HostnameVerifier" is no longer in place.
> I have a patch I'm about to attach which caused both createSocket() methods on o.a.h.conn.ssl.SSLSocketFactory to blowup:
> test1: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> test2: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> Hopefully people agree that this is desirable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Updated: (HTTPCLIENT-613) https should check CN of x509 cert
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HTTPCLIENT-613?page=all ]
Oleg Kalnichevski updated HTTPCLIENT-613:
-----------------------------------------
Fix Version/s: 4.0 Alpha 1
> https should check CN of x509 cert
> ----------------------------------
>
> Key: HTTPCLIENT-613
> URL: http://issues.apache.org/jira/browse/HTTPCLIENT-613
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: Nightly Builds
> Reporter: Julius Davies
> Priority: Critical
> Fix For: 4.0 Alpha 1
>
> Attachments: SSLSocketFactory.patch
>
>
> https should check CN of x509 cert
> Since we're essentially rolling our own "HttpsURLConnection", the checking provided by "javax.net.ssl.HostnameVerifier" is no longer in place.
> I have a patch I'm about to attach which caused both createSocket() methods on o.a.h.conn.ssl.SSLSocketFactory to blowup:
> test1: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> test2: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> Hopefully people agree that this is desirable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Updated: (HTTPCLIENT-613) https should check CN of x509 cert
Posted by "Julius Davies (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HTTPCLIENT-613?page=all ]
Julius Davies updated HTTPCLIENT-613:
-------------------------------------
Attachment: SSLSocketFactory.patch
patch also includes fix of an NPE when using createSocket( Socket s ) [the method that upgrades pre-existing plain socket to SSLSocket].
Not sure where to put my testing code - sorry I'm such a newb! Here's the testing code:
public static void main( String[] args ) throws Exception {
String host = args[ 0 ];
SSLSocketFactory f = new SSLSocketFactory();
HttpParams params = new DefaultHttpParams();
try {
Socket s = f.createSocket( args[ 0 ], 443, null, 0, params );
exercise( host, s );
s.close();
} catch ( Exception e ) {
System.out.println( "test1: " + e );
}
try {
Socket s = new Socket( args[ 0 ], 443 );
s = f.createSocket( s, args[ 0 ], 443, true );
exercise( host, s );
s.close();
} catch ( Exception e ) {
System.out.println( "test2: " + e );
}
}
private static void exercise( String host, Socket s ) throws Exception {
InputStream in = s.getInputStream();
OutputStream out = s.getOutputStream();
out.write( ( "HEAD / HTTP/1.1\r\n" +
"host: " + host + "\r\n\r\n" ).getBytes() );
out.flush();
for ( int i = 0; i < 64; i++ ) {
int b = in.read();
if ( b == -1 ) {
break;
}
else {
System.out.print( (char) b );
}
}
System.out.println();
}
> https should check CN of x509 cert
> ----------------------------------
>
> Key: HTTPCLIENT-613
> URL: http://issues.apache.org/jira/browse/HTTPCLIENT-613
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: Nightly Builds
> Reporter: Julius Davies
> Priority: Critical
> Attachments: SSLSocketFactory.patch
>
>
> https should check CN of x509 cert
> Since we're essentially rolling our own "HttpsURLConnection", the checking provided by "javax.net.ssl.HostnameVerifier" is no longer in place.
> I have a patch I'm about to attach which caused both createSocket() methods on o.a.h.conn.ssl.SSLSocketFactory to blowup:
> test1: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> test2: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> Hopefully people agree that this is desirable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Resolved: (HTTPCLIENT-613) https should check CN of x509
cert
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HTTPCLIENT-613?page=all ]
Oleg Kalnichevski resolved HTTPCLIENT-613.
------------------------------------------
Resolution: Fixed
> https should check CN of x509 cert
> ----------------------------------
>
> Key: HTTPCLIENT-613
> URL: http://issues.apache.org/jira/browse/HTTPCLIENT-613
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: Nightly Builds
> Reporter: Julius Davies
> Priority: Critical
> Fix For: 4.0 Alpha 1
>
> Attachments: SSLSocketFactory.patch, SSLSocketFactory_best.patch, SSLSocketFactory_improved.patch
>
>
> https should check CN of x509 cert
> Since we're essentially rolling our own "HttpsURLConnection", the checking provided by "javax.net.ssl.HostnameVerifier" is no longer in place.
> I have a patch I'm about to attach which caused both createSocket() methods on o.a.h.conn.ssl.SSLSocketFactory to blowup:
> test1: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> test2: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> Hopefully people agree that this is desirable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Commented: (HTTPCLIENT-613) https should check CN of x509
cert
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HTTPCLIENT-613?page=comments#action_12456645 ]
Oleg Kalnichevski commented on HTTPCLIENT-613:
----------------------------------------------
> Not sure how to deal with this 2nd patch. Do I upload a new patch containing both fixes?
Yes, you do. That's the easiest way.
Overall the patch looks good to me. I'll review it a little more thoroughly in the morning and commit the changes to SVN
Many thanks for this contribution, Julius
Oleg
> https should check CN of x509 cert
> ----------------------------------
>
> Key: HTTPCLIENT-613
> URL: http://issues.apache.org/jira/browse/HTTPCLIENT-613
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: Nightly Builds
> Reporter: Julius Davies
> Priority: Critical
> Fix For: 4.0 Alpha 1
>
> Attachments: SSLSocketFactory.patch
>
>
> https should check CN of x509 cert
> Since we're essentially rolling our own "HttpsURLConnection", the checking provided by "javax.net.ssl.HostnameVerifier" is no longer in place.
> I have a patch I'm about to attach which caused both createSocket() methods on o.a.h.conn.ssl.SSLSocketFactory to blowup:
> test1: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> test2: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> Hopefully people agree that this is desirable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Updated: (HTTPCLIENT-613) https should check CN of x509 cert
Posted by "Julius Davies (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HTTPCLIENT-613?page=all ]
Julius Davies updated HTTPCLIENT-613:
-------------------------------------
Attachment: SSLSocketFactory_improved.patch
- Better formatting on the curly braces (e.g. "} else {" now on one line).
- A few more comments.
- Hostname verification no longer throws an NPE under IBM 1.4.2 when accessing a server that has spurious certificates in its chain. Instead it throws the underlying reason that's actually bothering IBM (IBM-1.4.x hates spurious certificates!).
Here's some testing:
=======================================
Ability to deal with spurious certificates in chain.
(I only tested on Linux)
Succeeds:
------------------------
IBM 1.5.0
JRockit 1.4.2
JRockit 1.5.0
Sun 1.4.2
Sun 1.5.0
Sun 1.6.0-rc
Fails:
------------------------
IBM 1.4.2
> https should check CN of x509 cert
> ----------------------------------
>
> Key: HTTPCLIENT-613
> URL: http://issues.apache.org/jira/browse/HTTPCLIENT-613
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: Nightly Builds
> Reporter: Julius Davies
> Priority: Critical
> Fix For: 4.0 Alpha 1
>
> Attachments: SSLSocketFactory.patch, SSLSocketFactory_improved.patch
>
>
> https should check CN of x509 cert
> Since we're essentially rolling our own "HttpsURLConnection", the checking provided by "javax.net.ssl.HostnameVerifier" is no longer in place.
> I have a patch I'm about to attach which caused both createSocket() methods on o.a.h.conn.ssl.SSLSocketFactory to blowup:
> test1: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> test2: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> Hopefully people agree that this is desirable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Commented: (HTTPCLIENT-613) https should check CN of x509
cert
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HTTPCLIENT-613?page=comments#action_12456768 ]
Oleg Kalnichevski commented on HTTPCLIENT-613:
----------------------------------------------
Patch (with some minor tweaks) checked in. Many thanks, Julius
Now, since there appears to be many ways to skin a cat (I mean to check CN of x509 cert), we should provide a means to inject a case specific implementation of the CN verifier instead of trying to cover all possible scenarios with one implementation . I think we should come up with abstract interface to represent the process of CN verification and provide multiple implementations of it (lenient, strict, IBMJSSE specific). This should also allow for better unit testing of the CN verification logic. Speaking of which, some unit tests would be just awesome.
Oleg
> https should check CN of x509 cert
> ----------------------------------
>
> Key: HTTPCLIENT-613
> URL: http://issues.apache.org/jira/browse/HTTPCLIENT-613
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: Nightly Builds
> Reporter: Julius Davies
> Priority: Critical
> Fix For: 4.0 Alpha 1
>
> Attachments: SSLSocketFactory.patch, SSLSocketFactory_best.patch, SSLSocketFactory_improved.patch
>
>
> https should check CN of x509 cert
> Since we're essentially rolling our own "HttpsURLConnection", the checking provided by "javax.net.ssl.HostnameVerifier" is no longer in place.
> I have a patch I'm about to attach which caused both createSocket() methods on o.a.h.conn.ssl.SSLSocketFactory to blowup:
> test1: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> test2: javax.net.ssl.SSLException: hostname in certificate didn't match: <vancity.com> != <www.vancity.com>
> Hopefully people agree that this is desirable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org