hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Custom ProtocolSocketFactory not being used
Date Wed, 24 Jun 2009 12:49:16 GMT
On Mon, Jun 22, 2009 at 07:42:15PM -0500, Ian Pilcher wrote:
> I am following the instructions at
> http://hc.apache.org/httpclient-3.x/sslguide.html to connect to a server
> whose certificate is signed by an internal certificate authority (CA).
> I've created my own implementation of SecureProtocolSocketFactory, and
> I've verified that the SSLSockets it creates can successfully handshake
> with the server.
> 
> I cannot figure out, however, how to get HttpClient to actually use my
> factory.  I've tried all of the methods suggested in the HttpClient SSL
> Guide:
> 
>   - registering my factory as the factory for https
>a

This should work.
 
>   - registering my factory as the factory for a different protocol and
>     using that protocol in my URL
> 

This should work as well.


>   - httpclient.getHostConfiguration().setHost(...)
> 

Make sure to use relative URIs for HTTP requests when using this approach.

Oleg


> None of these techniques has any effect.  I've added a println at the
> beginning of all of the createSocket methods in my factory, and I can
> see that none of them is being called.
> 
> What am I missing?
> 
> Thanks!
> 
> -- 
> ========================================================================
> Ian Pilcher                                         arequipeno@gmail.com
> ========================================================================
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message