Java Trusting ssl CA

Posted by LuigiEdlCarno on Stack Overflow See other posts from Stack Overflow or by LuigiEdlCarno
Published on 2012-10-22T08:45:18Z Indexed on 2012/10/23 5:04 UTC
Read the original article Hit count: 126

Filed under:
|
|
|

I guess I am out of ideas here.

I am trying to consume a web service in java which has an ssl certificate.

I createt a a keystore file in which I have added the certificate. The file lies in my project folder.

I imported it using:

System.setProperty("javax.net.ssl.keyStore", "folder\\keystore.jks");
System.setProperty("javax.net.ssl.keyStorePassword", "SECRET");

Apparently, the web service call checks the keystore because when giving a wrong path to the file the application throws an exception when invoking the WS, not when setting the system property.

Anyway, when giving the correct path to the keystore file, I still get

AxisFault faultCode: {http://xml.apache.org/axis/}HTTP faultSubcode: faultString: (401)Authorization Required

Someone told me I had to trust the CA, before any of this would work.

How do I do this?

© Stack Overflow or respective owner

Related posts about java

Related posts about ssl