Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 14476 invoked from network); 8 Oct 2009 07:16:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Oct 2009 07:16:12 -0000 Received: (qmail 9740 invoked by uid 500); 8 Oct 2009 07:16:11 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 9645 invoked by uid 500); 8 Oct 2009 07:16:11 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 9635 invoked by uid 99); 8 Oct 2009 07:16:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 07:16:11 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 07:16:00 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MvnDs-00075Q-4w for user@commons.apache.org; Thu, 08 Oct 2009 00:15:36 -0700 Message-ID: <25799447.post@talk.nabble.com> Date: Thu, 8 Oct 2009 00:15:36 -0700 (PDT) From: Radika Apte To: user@commons.apache.org Subject: Re: IOExceptionjavax.net.ssl.SSLException: Unexpected end of handshake data In-Reply-To: <466081.9629.qm@web35401.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: radikaapte@gmail.com References: <466081.9629.qm@web35401.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org Does the server require the client to use a authentication certificate? Chetan-16 wrote: >=20 > Hi, >=20 > I'm=C2=A0trying to make a=C2=A0ftps connection to a server using apache's= ftps > client, > but getting a expection when trying to make the connection. >=20 > IOExceptionjavax.net.ssl.SSLException: Unexpected end of handshake > datajavax.net.ssl.SSLException: Unexpected end of handshake data >=20 > Can someone help with this. >=20 > Here is the expection >=20 > Trying to connect > ftps client created > Just before connectIOExceptionjavax.net.ssl.SSLException: Unexpected end > of handshake datajavax.net.ssl.SSLException > at com.sun.net.ssl.internal.ssl.HandshakeInStream.read(Unknown Source) > at > com.sun.net.ssl.internal.ssl.HandshakeMessage$CertificateMsg.(Unkno= wn > Source) > at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown > Source) > at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source) > at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source) > at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) > at > com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknow= n > Source) > at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown > Source) > at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown > Source) > at org.apache.commons.net.ftp.FTPSClient.sslNegotiation( > at org.apache.commons.net.ftp.FTPSClient._connectAction_( > at org.apache.commons.net.SocketClient.connect( > at com.accenture.ftps.trail.FtpsTrailClass.main(: Unexpected end of > handshake > dataFTPSClient.java:240)FTPSClient.java:171)SocketClient.java:178)FtpsTra= ilClass.java:35) >=20 > here is the code >=20 > int reply; > =C2=A0=C2=A0=C2=A0=C2=A0System.out.println("Trying to connect"); > =C2=A0=C2=A0=C2=A0=C2=A0FTPSClient ftps =3D new FTPSClient("SSL"); > =C2=A0=C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0System.out.println("ftps client created"); > =C2=A0=C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0//ftps.setAuthValue("SSL"); > =C2=A0=C2=A0=C2=A0=C2=A0System.out.println("Just before connect"); > =C2=A0=C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0ftps.connect("XXXXX",21); > =C2=A0=C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0System.out.println("Connected"); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =20 > =C2=A0=C2=A0=C2=A0 reply =3D ftps.getReplyCode(); > =C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = if (!FTPReply.isPositiveCompletion(reply)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ftps.disconnect(); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 System.err.println("FTP server refused connection.= "); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 System.exit(1); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = } > =C2=A0=C2=A0=C2=A0=C2=A0//ftps.setDefaultTimeout(1000); > =C2=A0=C2=A0=C2=A0=C2=A0//ftps.enterRemotePassiveMode(); > =C2=A0=C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0System.out.println("Before login"); > =C2=A0=C2=A0=C2=A0=C2=A0ftps.login("xxxx","xxxx"); > =C2=A0=C2=A0=C2=A0=C2=A0System.out.println("Connected to server");=C2=A0 > =C2=A0 > Thanks in advance > Chetan >=20 >=20 >=20 >=20 --=20 View this message in context: http://www.nabble.com/IOExceptionjavax.net.ss= l.SSLException%3A-Unexpected-end-of-handshake-data-tp23089863p25799447.html Sent from the Commons - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org