J
javerra
Hello all,
I have a simple servlet that I want to use to make a post via ssl to a
server. The server requires client authentication. The way I
understand the documentation that I have read is that the ca trust
store is defaulted to the java/lib/secuity.. cacerts file but that you
need to explicitly set the keystore if the client needs to
authenticate. Is my understanding correct?
System.setProperty("javax.net.ssl.keyStore","c:\\mykey.p12");
System.setProperty("javax.net.ssl.keyStorePassword","mypassword");
The problem I am having is that I've done this and I am still getting
an I/O exception with a response code of 403 Forbidden from the server.
If I import the key database into my browser I am able to connect
fine. If anyone could point me to some better documentation on
describe exactly how client authentication can be done I would
appreciate it.
Here is the area of my code where I am having problems
URL myURL = new URL("serveraddress");
HttpsURLConnection myConnection = (HttpsURLConnection)
myURL.openConnection();
......write to output stream
BufferedReader talxResponse = new BufferedReader(new
InputStreamReader(myConnection.getInputStream())); <---
response error
THANKS!!!!!!!!!!
I have a simple servlet that I want to use to make a post via ssl to a
server. The server requires client authentication. The way I
understand the documentation that I have read is that the ca trust
store is defaulted to the java/lib/secuity.. cacerts file but that you
need to explicitly set the keystore if the client needs to
authenticate. Is my understanding correct?
System.setProperty("javax.net.ssl.keyStore","c:\\mykey.p12");
System.setProperty("javax.net.ssl.keyStorePassword","mypassword");
The problem I am having is that I've done this and I am still getting
an I/O exception with a response code of 403 Forbidden from the server.
If I import the key database into my browser I am able to connect
fine. If anyone could point me to some better documentation on
describe exactly how client authentication can be done I would
appreciate it.
Here is the area of my code where I am having problems
URL myURL = new URL("serveraddress");
HttpsURLConnection myConnection = (HttpsURLConnection)
myURL.openConnection();
......write to output stream
BufferedReader talxResponse = new BufferedReader(new
InputStreamReader(myConnection.getInputStream())); <---
response error
THANKS!!!!!!!!!!