views:

12

answers:

0

Hi All,

I am trying to run a java client with 2way SSL which uses CAC card as keystore for the client. I have addded the following system property in my client program to make it work and change the java.security file to add pcks11 provider.

System.setProperty("javax.net.ssl.keyStoreType", "pkcs11"); System.setProperty("javax.net.debug", "ssl");

The program works fine and handshake is successfully done . But the problem is when i have more than one trusted certificate in the CAC card, it take a default certificate. I want to specify the certificate that should be used to do the client auth maybe specify the alias name . I didn't find any system property to do so. Please let me know how to specify alias name as system property so that the 2way SSL used the specified alias for the client auth or is there any other way to specify the alias name. As in case i access the server URL from any browser i get a certificate selection prompt and the connection is established with the selected certificate.

Thanks in advanced,