Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8E0157D80 for ; Fri, 25 Nov 2011 12:54:06 +0000 (UTC) Received: (qmail 69611 invoked by uid 500); 25 Nov 2011 12:54:05 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 69515 invoked by uid 500); 25 Nov 2011 12:54:05 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 69467 invoked by uid 99); 25 Nov 2011 12:54:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Nov 2011 12:54:04 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Nov 2011 12:54:02 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id AD9F79FAF4 for ; Fri, 25 Nov 2011 12:53:40 +0000 (UTC) Date: Fri, 25 Nov 2011 12:53:40 +0000 (UTC) From: "Carlos Bustamante (Commented) (JIRA)" To: issues@commons.apache.org Message-ID: <1269474272.11803.1322225620712.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1688030667.21532.1305696587635.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (NET-408) problem connecting to ProFTPD with FTPES MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/NET-408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157139#comment-13157139 ] Carlos Bustamante commented on NET-408: --------------------------------------- Hi, recently i try to use the claymoresystems, with the Crytix library, *jdk 1.7, but it shows me an the class Socket is duplicated, and i have reviewed this same bug with proftpd-1.3.3c-1.el5.rf with centos 5.7, SOLUTION use vsftpd with this configuration ssl_enable=YES allow_anon_ssl=NO force_local_data_ssl=NO force_local_logins_ssl=YES ssl_tlsv1=YES ssl_sslv2=NO ssl_sslv3=NO rsa_cert_file=/etc/vsftpd/vsftpd.pem xferlog_enable=YES log_ftp_protocol=YES setproctitle_enable=YES this works great, without modify the apache commons library. The problem originated basically was the ciphed method used by proftdp not supported > problem connecting to ProFTPD with FTPES > ---------------------------------------- > > Key: NET-408 > URL: https://issues.apache.org/jira/browse/NET-408 > Project: Commons Net > Issue Type: Bug > Components: FTP > Affects Versions: 2.2, 3.0 > Environment: ProFTPD 1.3.3d on SUSE Linux Enterprise Server 10.1 32bit, Kernel 2.6.16.46-0.12-default (config file attached) > ProFTPD 1.3.3d on OpenSUSE 64bit Linux 2.6.34.8-0.2-desktop > Java 1.5 > Reporter: Michael Voigt > Attachments: BCFTPSClient.java, PTFTPSClient.java, ftpes.jpg, proftpd.conf > > > I have a problem with the FTPClient connecting to a ProFTPD server. > If the server uses the configuration option "TLSProtocol TLSv1", I > cannot connect to it at all. I recieve the following error message: > - javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection > On the server side I see in the log: > unable to accept TLS connection: protocol error: > - (1) error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert > certificate unknown > - TLS/TLS-C negotiation failed on control channel > If the server uses the configuration option "TLSProtocol SSLv23", I > can connect to it but I cant transfer any files. In the server log I > see: > - starting TLS negotiation on data connection > - TLSv1/SSLv3 renegotiation accepted, using cipher RC4-MD5 (128 bits) > - client did not reuse SSL session, rejecting data connection (see > TLSOption NoSessionReuseRequired) > - unable to open data connection: TLS negotiation failed > If I add the NoSessionReuseRequired parameter to the ProFTPD config > everything works fine. > Here is my code: > FTPClient ftpClient = new FTPClient(); > ftpClient = new FTPSClient("TLS"); > // this throws an exception with TLSProtocol TLSv1 > ftpClient.connect(host, port); > int reply = ftpClient.getReplyCode(); > if (!FTPReply.isPositiveCompletion(reply)) { > ftpClient.disconnect(); > log.error("The FTP Server did not return a positive completion reply!"); > throw new FtpTransferException(ECCUtils.ERROR_FTP_CONNECTION); > } > boolean loginSuccessful = ftpClient.login(userName, password); > if (!loginSuccessful) { > log.error("Login to the FTP Server failed! The credentials are not valid."); > throw new FtpTransferException(ECCUtils.ERROR_FTP_LOGIN); > } > ftpClient.execPBSZ(0); > ftpClient.execPROT("P"); > boolean success = ftpClient.storeFile(fileName, fis); > if (!success) { > // this is false if "NoSessionReuseRequired" is not set > } > Now my question is if it is generally possible to connect to a server > with "TLSProtocol TLSv1" or "TLSProtocol SSLv23" without the > "NoSessionReuseRequired" parameter? Could someone provide a piece of > example code for this? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira