Hi everyone !
here is my problem:
*1 -* I'm failing to do SSL Client Authentication using
Apache-Commons-HTTPClient API v 3.0.
*2 -* But I'm successful in doing SSL Server Authentication using
Apache-Commons-HTTPClient API v3.0
I'm using JDK v-1.5.0_06

Following are my steps for 2:
I have override the following settings of JRE for SSL Server Auth:

System.setProperty( "javax.net.ssl.trustStore" , this.sslKeystoreFilePath);
System.setProperty( "javax.net.ssl.trustStorePassword" ,
this.sslKeystorePassword );
System.setProperty( "java.protocol.handler.pkgs" ,
"com.sun.net.ssl.internal.www.protocol" );
Security.addProvider( *new* com.sun.net.ssl.internal.ssl.Provider() );

and Its doing fine.
But I don't find any useful class to do SSL Client Authentication.
I know the way to do SSL Client Authentication using pure JSSE i.e.

getCertsAndKeysFromPFXWithJSSE(); //Getting Keys and Certs from PFX using JSSE
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(kmf.getKeyManagers(), null, *null*); //kmf=KeyManagerFactory
SSLSocketFactory f = sc.getSocketFactory();
SSLSocket c = (SSLSocket) f.createSocket(url, port);
//Enabling Client Authentication
c.setNeedClientAuth(*true*);
printSocketInfo(c);
sendRequest("hello".getBytes(), c, url);

This code is also working fine.

But I'm unable to perform the same task using Apache-Commons-HTTPClient API
v 3.0. [I have to use this API]. Is there any way that I can plug my
functionality with Apache-Commons-HTTPClient API v 3.0 at JSSE level.

please help me in this regard.

br

KS

Reply via email to