hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: several HTTPS connection to different domain
Date Fri, 11 Feb 2005 20:32:24 GMT
On Fri, 2005-02-11 at 18:08 +0100, jrlecq@easyvoyage.fr wrote:
> Is it possible to establish  at the same time several HTTPS connections to
> different domains ?
> 
> Example : I have to connect to one domain authenticated by Verisign Root
> certificate and to an another domain autheticated by the Thawte Sa
> Certificate.
> The connection to each separatly generate no pb. But I can not make
> simultaneous connection on the both.

Jean-Rémi,

You need to register one SecureProtocolSocketFactory per authentication
domain

Protocol verisign = new Protocol(
  "https", new VerisignSSLSocketFactory(), 443 );
Protocol.registerProtocol("verisignhttps", verisign);

Protocol thawte = new Protocol(
  "https", new ThawteSSLSocketFactory(), 443 );
Protocol.registerProtocol("thawtehttps", thawte);

Than you could do something like that:

GetMethod httpget1 = new GetMethod("verisignhttps://host1");
GetMethod httpget2 = new GetMethod("thawtehttps://host2");

Hope this helps

Oleg


> 
> I am using HttpClient 2.0.2 with several HttpClient instance managed by the
> MultiThreadedHttpConnectionManager and a personal keystore in what I put
> just needed certificats (no more).
> Jean-Rémi
> Société EASYVOYAGE
> tel: 01 44 25 94 21
> 


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


Mime
View raw message