commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Sangster" <>
Subject [httpclient 3.0 rc1] - Protocol.registerProtocol
Date Tue, 28 Jun 2005 12:49:45 GMT

I started off developing my current project utilizing 3.0 rc1 of httpclient.
It's all working fine, and perhaps the error I'm getting is fixed in rc3,
but here goes.

I'm attempting to register a new protocol which allows self-signed
certificates to be accepted without saying "no trusted certificate found".
I've based this code off of the EasySSLSocketFactory (sp?).   It works
beautifully when I register this with the string "https", as in

Protocol.registerProtocol( "https", myProtocol );

However... the trouble for me starts when I register this with a different
name, say, "myhttps", so as to avoid replacing the default https processing
as I still want that available for most cases.   If I pass in a URL with
this prefix, it picks up the right ProtocolSocketFactory class (determined
through the debugger), but it's methods are never called (writing out some
System.out.println to test this).   It seems that it's defaulting back to
the default Sun https checking code as I get the exception of "no trusted
certificate found".

Has anyone else encountered this problem?    Once again, if the "https"
protocol is overwritten, it works fine, but if I register under anything
different then it defaults to the basic https checking which returns an

Any help or even shared experienced would be welcome.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message