If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

I am new to JSSE and I have to develop a java client that is going to send and receive data to a https server. I am using java version "1.4.2_04" on windows XP. The administrator on the server side has given me a file called "cacerts.pem" , I assume this is certificate, and another one called "nat.cer". I have written my client as follows :

The code compiles fine, and when I try to run it, I get the following error :

c:\_dev> java TestHttpsClient

POST parameters.....
Warning: URL Host: servername vs. servername
response........
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(DashoA6275)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:222)
at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:756)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:711)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:626)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Dash
oA6275)
at NatisHttpsClient.main(TestHttpsClient.java:66)
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

I have read through the postings on the net over the past week and haven't been succesfull in getting any where. My main problem is how to tell my program of "nat.cer" of "cacert.pem".