Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error connecting to HTTPS using IAIK

Status
Not open for further replies.

mluken

Programmer
Dec 31, 2003
54
US
I am trying to connect to an https site from a java servlet, pull back the response and parse the results. I know that I was able to do this at one point, but the server I am using has just been upgraded and haven't tried it since then. I am not sure if something is different in security, or if that even has anything to do with it?

Here is my code:

StringBuffer sb = new StringBuffer();
sb.append(" sb.append("passurl=somevalue");
sb.append("&mode=normal");
try {
URL aURL = new URL(null, sb.toString(), new iaik.protocol.https.Handler());

HttpURLConnection huc = (HttpURLConnection) aURL.openConnection();
BufferedReader br = new BufferedReader(new InputStreamReader(huc.getInputStream()));

String line = "";

StringBuffer resp = new StringBuffer();
while((line = br.readLine()) != null)
{
// do something here
}

br.close();
huc.disconnect();

} catch (MalformedURLException e){
System.out.println("MalformedURLException: " + e);
} catch (IOException e){
System.out.println("IOException: " + e);
}

And here is the exception that I get:

IOException: org.w3c. iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure


Any suggestions at all?

Thanks!
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top