Hi Oleg,

Thanks for your reply.
But I am using the the *CRL check* feature of the not-yet-common-ssl library
and that's why I am using the *AuthSSLProtocolSocketFactory *factory.Is the
class *AuthSSLProtocolSocketFactory* compatible with* *the *Httpclient
4.0*library
*?*

~Arpita

On Thu, Jul 22, 2010 at 1:01 AM, Oleg Kalnichevski <[email protected]> wrote:

> On Wed, 2010-07-21 at 21:34 +0530, arpita k wrote:
> > Hi,
> >
> > I am using common-httpclient 3.0 and common-ssl 0.3.11 library to
> establish
> > SSL communication between client and the server.Here is the code:
> >
> >
> > *AuthSSLProtocolSocketFactory myAuthFactory = null;
> >         try
> >         {
> >             myAuthFactory = new AuthSSLProtocolSocketFactory(new
> URL("file:"
> >                     + KEYSTORE_LOCATION), KEYSTORE_PASSWORD, new
> URL("file:"
> >                     + TRUSTSTORE_LOCATION), TRUSTSTORE_PASSWORD);
> >
> >
> >             Protocol myhttps = new Protocol("https", myAuthFactory,
> > serverPort);
> >             Protocol.registerProtocol("https", myhttps);
> >             signClient.getHostConfiguration().setHost(serverName,
> > serverPort,
> >                     myhttps);
> >
> signClient.getParams().setCookiePolicy(CookiePolicy.RFC_2109);
> >
> > *
> > The AuthSSLProtocolSocketFactory  is part of common-ssl library.
> > Now I need to upgrade the httpclient from 3.0 to 4.0.But I want to use
> the
> > AuthSSLProtocolSocketFactory  factory as it is doin gCRL check
> > automatically.
> >
> > I know that the schem is replaced by the Protocol of httpclient 4.0.But I
> > don't think it could take AuthSSLProtocolSocketFactory   as a
> parameter.So,
> > which way I should proceed?
> >
>
> You should create an instance of SSLContext using not-yet-commons SSL
> and pass it to the constructor of the SSLSocketFactory as described
> here:
>
>
> http://hc.apache.org/httpcomponents-client-4.0.1/tutorial/html/connmgmt.html#d4e497
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to