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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
