hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: SSL over HTTPClient
Date Tue, 27 Dec 2005 16:57:13 GMT
On Mon, Dec 26, 2005 at 10:39:36PM +0530, Nishant Agrawal wrote:
> Hi,
> 
>  
> 
> I use a custom SecureProtocolSocketFactory, similar to the one at
> http://svn.apache.org/viewcvs.cgi/jakarta/commons/proper/httpclient/trun
> k/src/contrib/org/apache/commons/httpclient/contrib/ssl/AuthSSLProtocolS
> ocketFactory.java?view=markup
>  
> 
> I provde it a keystore and a truststore, and corresponding passwords.
> 
>  
> 
> Now I do following :
> 
>  
> 
> HostConfiguration hostConfig = new HostConfiguration();
> hostConfig.setHost("www.myurl.com", 443, myhttps);
> 
>  
> 
> In keystore I have lot many aliases, how does API find which alias to be
> used for this specific URL(www.myurl.com <http://www.myurl.com/> ).
> 
> 
Nishant,

The KeyStore#aliases() will give you an enumeration of all aliases in a
keystore

The KeyStore#getCertificateChain(String) will give you an array of
certificates associated with a given alias.

I _believe_ the trust manager factory will generate one trust manager
per alias / certificate chain. It is usually sufficient that at least
one trust manager will recognize a certificate chain as a valid one.

Hope this helps

Oleg


> 
> Regards,
> 
> Nishant Agrawal
> 

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


Mime
View raw message