I created one simple test java application to connect to a web service over HTTP/SSL.
The webservice provider given us 3 certificates for testing purpose:
1. Client Test Certificate with private key: abctest.p12
2. Client Test Certificate with public key: abctest.cer
3. Provider Test Certificate with public key: abc.cer
I've added these 3 certificate into "cacerts" truststore using java 'keytool'.
for 3 certificates, i created 3 different alias name: abcp12, abctest & abc in "cacerts" truststore.
And then I test the program, for 1way SSL connection, my program works fine(request to them, they return response).
But when i try to use 2 ways SSL connection, my program does not work. It gives me this error: "received fatal error: bad_certificate"
I've googled but doesn't help me at all.
I've added 3 certificates into my truststore.
I checked the list with command "keytool -list -v" and all the certs are there.
1way ssl is working but 2ways ssl is NOT working with receiving bad certificate error.
Can anyone please help me? Why bad certificate? Something wrong with the way I add the cert into truststore file?