You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Will McQueen <wi...@yahoo.com> on 2009/06/16 08:15:47 UTC
HttpClient 4.0 Tutorial, and SSLSocketFactory
Hi,
The HttpClient 4.0 tutorial says:
SSLSocketFactory sf = new SSLSocketFactory(sslcontext);
...but I don't see that the javax.net.ssl.SSLSocketFactory takes a param of type SSLContext. Did you mean:
SSLSocketFactory sf = (SSLSocketFactory)sslcontext.getSocketFactory();
...? [as alluded to in the SSL section of http://java.sun.com/products/javamail/SSLNOTES.txt]
Cheers,
Will
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org
Re: HttpClient 4.0 Tutorial, and SSLSocketFactory
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, Jun 15, 2009 at 11:15:47PM -0700, Will McQueen wrote:
>
> Hi,
>
> The HttpClient 4.0 tutorial says:
>
> SSLSocketFactory sf = new SSLSocketFactory(sslcontext);
>
> ...but I don't see that the javax.net.ssl.SSLSocketFactory takes a param of type SSLContext. Did you mean:
>
> SSLSocketFactory sf = (SSLSocketFactory)sslcontext.getSocketFactory();
>
> ...? [as alluded to in the SSL section of http://java.sun.com/products/javamail/SSLNOTES.txt]
>
> Cheers,
> Will
>
Hi Will
Packages names are omitted for brevity. It is this class:
http://hc.apache.org/httpcomponents-client/httpclient/apidocs/org/apache/http/conn/ssl/SSLSocketFactory.html
Hope this helps
Oleg
>
>
>
> ---------------------------------------------------------------------
> 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