cURL / Mailing Lists / curl-users / Single Mail

curl-users

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

From: Andy Ee <andyee_at_sysatwork.com>
Date: Fri, 21 Jan 2011 17:57:07 +0800

Dear All,

 

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 <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).

 

bash-3.00# curl -v ftp://username:password@192.168.0.112/sawnet/ccsaw/ -k
--ftp-ssl

* About to connect() to 192.168.0.112 port 21 (#0)

* Trying 192.168.0.112... connected

* Connected to 192.168.0.112 (192.168.0.112) port 21 (#0)

< 220-FTP server ready.

< 220 This is a private system - No anonymous login

> AUTH SSL

< 500 This security scheme is not implemented

> AUTH TLS

< 234 AUTH TLS OK.

* SSLv2, Client hello (1):

* SSLv3, TLS handshake, Server hello (2):

* SSLv3, TLS handshake, CERT (11):

* SSLv3, TLS handshake, Server finished (14):

* SSLv3, TLS handshake, Client key exchange (16):

* SSLv3, TLS change cipher, Client hello (1):

* SSLv3, TLS handshake, Finished (20):

* SSLv3, TLS change cipher, Client hello (1):

* SSLv3, TLS handshake, Finished (20):

* SSL connection using AES256-SHA

* Server certificate:

* subject: C=TW, ST=TW, L=Taipei, O=NAS Provider, OU=Common,
CN=NAS_Common.com, emailAddress=support_at_common.com

* start date: 2009-02-23 12:06:11 GMT

* expire date: 2019-02-21 12:06:11 GMT

* common name: NAS_Common.com (does not match '192.168.0.112')

* issuer: C=TW, ST=TW, L=Taipei, O=NAS Provider, OU=Common,
CN=NAS_Common.com, emailAddress=support_at_common.com

* SSL certificate verify result: self signed certificate (18),
continuing anyway.

> USER justinho

< 331 User justinho OK. Password required

> PASS password

< 230-This server supports FXP transfers

< 230 OK. Current restricted directory is /

> PBSZ 0

< 200 PBSZ=0

> PROT P

< 200 Data protection level set to "private"

> PWD

< 257 "/" is your current location

* Entry path is '/'

> CWD sawnet

< 250 OK. Current directory is /sawnet

> CWD ccsaw

< 250 OK. Current directory is /sawnet/ccsaw

> EPSV

* Connect data stream passively

< 500 Unknown command

* disabling EPSV usage

> PASV

< 227 Entering Passive Mode (192,168,0,112,123,11)

* Trying 192.168.0.112... connected

* Connecting to 192.168.0.112 (192.168.0.112) port 31499

> TYPE A

< 200 TYPE is now ASCII

> LIST

 

The process hanged at this stage. I went ahead to disable the security, so
FTP will run on normal mode. Then, I attempted to connect again and it
works.

 

bash-3.00# curl -v ftp://username:password@192.168.0.112/sawnet/ccsaw/

* About to connect() to 192.168.0.112 port 21 (#0)

* Trying 192.168.0.112... connected

* Connected to 192.168.0.112 (192.168.0.112) port 21 (#0)

< 220-FTP server ready.

< 220 This is a private system - No anonymous login

> USER justinho

< 331 User justinho OK. Password required

> PASS password

< 230-This server supports FXP transfers

< 230 OK. Current restricted directory is /

> PWD

< 257 "/" is your current location

* Entry path is '/'

> CWD sawnet

< 250 OK. Current directory is /sawnet

> CWD ccsaw

< 250 OK. Current directory is /sawnet/ccsaw

> EPSV

* Connect data stream passively

< 500 Unknown command

* disabling EPSV usage

> PASV

< 227 Entering Passive Mode (192,168,0,112,123,102)

* Trying 192.168.0.112... connected

* Connecting to 192.168.0.112 (192.168.0.112) port 31590

> TYPE A

< 200 TYPE is now ASCII

> LIST

< 150 Accepted data connection

* Maxdownload = -1

drwxrwxrw- 8 1000 100 72 Jan 21 11:36 .

drwxrwxrwx 1 0 0 18 Jan 19 18:05 ..

drwxrwxrw- 2 1000 100 6 Jan 13 09:27 2008

drwxrwxrw- 2 1000 100 6 Jan 13 09:27 2009

drwxrwxrw- 2 1000 100 6 Jan 13 09:27 2010

drwxrwxrw- 3 1000 100 16 Jan 13 09:49 2011

drwxrwxrw- 2 1000 100 6 Jan 13 09:27 2012

drwxrwxrw- 2 1000 100 6 Jan 13 09:27 logs

* Remembering we are in dir "sawnet/ccsaw/"

< 226-Options: -a -l

< 226 8 matches total

* Connection #0 to host 192.168.0.112 left intact

> QUIT

< 221-Goodbye. You uploaded 0 and downloaded 0 kbytes.

< 221 Logout.

* Closing connection #0

 

My server IP is 192.168.0.73, which is in the same network as the FTP
server.

 

What do you think is the problem?

 

I also tried connecting to the FTP server with security enabled using WinSCP
on a Windows server, and it works.

 

 

 

 

 

Best Regards,
Andy Ee

Senior Systems Engineer
Infrastructure & Operations
 <mailto:Systems_at_Work> Systems_at_Work Ptd Ltd
Tel: (65) 6873 8123
Fax: (65) 6392 2242
Email: <mailto:andyee_at_sysatwork.com> andyee_at_sysatwork.com

 

 

 

-------------------------------------------------------------------
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

ATT00560.jpg
Received on 2011-01-21