On Mon, Dec 05, 2005 at 06:46:48PM +0200, Oren Gross wrote: > I am sure some here came through this problem before... > > Thanks >
Oren Most likely this problem has nothing to do with HttpClient and is related to (mis-)configuration of the SSL context used to set up the connection. Please see the SSL guide 'troubleshooting' section for details how to test the SSL context validitiy [1] Oleg [1] http://jakarta.apache.org/commons/httpclient/sslguide.html#Troubleshooting > -------- Original Message -------- > Subject: javax.net.ssl.SSLHandshakeException: Remote host closed > connection during handshake > Date: Tue, 22 Nov 2005 21:58:25 +0200 > From: Oren Gross <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > > > > > Hi there > > We have a web application and only recently we started using HTTPS. We > have an applet that fails with the exception above. I took the simplest > code: > public static void main(String[] args) { > HttpClient httpclient = new HttpClient(); > GetMethod httpget = new GetMethod(args[0]); > try { > httpclient.executeMethod(httpget); > System.out.println(httpget.getStatusLine()); > } catch (Exception e) { > e.printStackTrace(); //To change body of catch statement > use File | Settings | File Templates. > } finally { > httpget.releaseConnection(); > } > } > > When I run this with https://www.verisign.com/ all is well, but when I > run it with our url I get: > javax.net.ssl.SSLHandshakeException: Remote host closed connection > during handshake > at > com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:739) > at > com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025) > at > com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:619) > at > com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59) > at > org.apache.commons.httpclient.HttpConnection$WrappedOutputStream.write(HttpConnection.java:1344) > at > java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) > at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) > at > org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:775) > at > org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2252) > at > org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2632) > at > org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1065) > at > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:643) > at > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:497) > at com.snap.graphview.Test.main(Test.java:16) > Caused by: java.io.EOFException: SSL peer shut down incorrectly > at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:321) > at > com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:720) > ... 13 more > > Can any one help? > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
