cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Solaris 10 using Curl to connect to FTPES (SSL/TLS Explicit)

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 21 Jan 2011 14:55:30 -0800

On Fri, Jan 21, 2011 at 05:57:07PM +0800, Andy Ee wrote:
> I have a FTP server that is enabled with Security (SSL/TLS Explicit). I am
> supposed to upload files to this FTP server from a Solaris 10 server. In order
> to do so, I installed Curl 7.19.5, which I downloaded from http://
> www.sunfreeware.com.
>
> However, I met with a problem when I was connecting to the FTP server using
> Curl. It hangs at the stage when it is listing the file directory (shown
> below).

These logs could be easily explained away if the connection were going through
an stateful firewall. The PASV response could not be snooped upon since it's
in the encrypted control connection, so the firewall would not know which
port to open to allow the connection. But if these two machines are on the
same network, this is unlikely (but possible) to be the problem. You could
try using the --ftp-ssl-ccc option to stop encrypting the connection once
the authentication has been performed; this will let a firewall "see" the
PASV and open up the given port.

Another possibility is that the remote server is not encrypting the data
connection (which means it's not honouring the "PROT P"). That would cause
libcurl to look for an SSL handshake on the connection but instead receive
a directory listing. But I would expect the SSL library to complain with an
error message in this case, which isn't happening here.

IMHO, the most likely cause is restrictive firewall settings on the
FTP server.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-01-21