« Return to Thread: Custom ProtocolSocketFactory not being used

Re: Custom ProtocolSocketFactory not being used

by olegk :: Rate this Message:

Reply to Author | View in Thread

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@...
> ========================================================================
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@...
> For additional commands, e-mail: httpclient-users-help@...
>

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

 « Return to Thread: Custom ProtocolSocketFactory not being used