On Wed, Jun 03, 2009 at 03:00:31PM +0200, Guy wrote:
> Hi all,
> 
> I was wondering if there is a way to retrieve the Socket (and therefore the
> SSLSession if using SSL) from a connection.
> 
> I noticed there is a protected getSocket() method in the HttpConnetion
> class, but since this method is protected and not public it is no good for
> me (or can I somehow make HttpClient use a custom HttpConnection object).
> 
> The reason I ask is I want to monitor X509 Certificates used on the server
> side. I know it is much easier to do with a (custom- SSLSocketFactory and
> use SSLSockets from the socketfactory, but I need the proxy functionality
> build in HttpClient and it is not that easy to connect through a proxy that
> uses authentication if you stick with sockets (or at least not easy for me
> :-) )
> 
> any help would be appreciated.
> 
> kind regards
> 
> Guy

You are out of luck with HttpClient 3.x. If you do not mind upgrading to
HttpClient 4.0 you could have a complete control over the process of socket
initialization by using a custom ClientConnectionOperator implementation.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to