curl-library
FTPS problems
Date: Mon, 1 Dec 2003 20:14:50 +0100
I've been trying FTPS with latest curl. Don't know if the order
of checking the schemes in url.c has anything to do with my
problems, but it looks suspicious. Shouldn't "FTPS" be checked
before "FTP" (since strncasecmp is used).
--- CVS-latest/lib/url.c Mon Nov 24 08:15:37 2003
+++ lib/url.c Mon Dec 01 18:20:01 2003
@@ -2094,10 +2094,7 @@
/* Note: if you add a new protocol, please update the list in
* lib/version.c too! */
- if(checkprefix("FTP", conn->gname)) {
- strcpy(conn->protostr, "ftp");
- }
- else if(checkprefix("GOPHER", conn->gname))
+ if(checkprefix("GOPHER", conn->gname))
strcpy(conn->protostr, "gopher");
#ifdef USE_SSLEAY
else if(checkprefix("HTTPS", conn->gname))
@@ -2105,6 +2102,8 @@
else if(checkprefix("FTPS", conn->gname))
strcpy(conn->protostr, "ftps");
#endif /* USE_SSLEAY */
+ else if(checkprefix("FTP", conn->gname))
+ strcpy(conn->protostr, "ftp");
else if(checkprefix("TELNET", conn->gname))
strcpy(conn->protostr, "telnet");
else if (checkprefix("DICT", conn->gname))
---------------
A friend of mine clams to have a FTPS enabled server running,
but I can't get it to work.
> curl -vvk --ftp-ssl -1 ftps://guest:***@195.56.193.26/test.zip
== Info: Couldn't find host 195.56.193.26 in the .netrc file, using defaults== Info:
About to connect() to 195.56.193.26 port 21
== Info: Connected to 195.56.193.26 (195.56.193.26) port 21
== Info: successfully set certificate verify locations:
== Info: CAfile: g:/MingW32/src/inet/curl-7.11.0/lib/ca-bundle.crt
CApath: none
== Info: SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
== Info: Closing connection #0
curl: (35) SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
Tried with -2 and -3 and w/o --ftp-ssl with similar results. This is a trace
from tethereal:
10.0.0.6 -> 195.56.193.26 TCP 3497 > ftp [SYN] Seq=1414936566 Ack=0 Win=60352 Len=0
195.56.193.26 -> 10.0.0.6 TCP ftp > 3497 [SYN, ACK] Seq=61100039 Ack=1414936567 Win=5840 Len=0
10.0.0.6 -> 195.56.193.26 TCP 3497 > ftp [ACK] Seq=1414936567 Ack=61100040 Win=64240 Len=0
10.0.0.6 -> 195.56.193.26 FTP Request:
\026\003\001\000b\001\000\000^\003\001?\313\221\324t\351kRMOdT\3306~cB\213\257\341\210&a9\321\315\353\037\024v1\377\000\0006\0009\00
08\0005\000\026\000\023\000
195.56.193.26 -> 10.0.0.6 FTP Response: 220 godzilla FTP server (Version 6.4/OpenBSD/Linux-ftpd-0.17) ready.
10.0.0.6 -> 195.56.193.26 FTP Request: \02520\000\002\002F
195.56.193.26 -> 10.0.0.6 TCP ftp > 3497 [ACK] Seq=61100110 Ack=1414936670 Win=5840 Len=0
195.56.193.26 -> 10.0.0.6 FTP Response: 500 '\026\003\001': command not understood.
10.0.0.6 -> 195.56.193.26 TCP 3497 > ftp [RST] Seq=1414936678 Ack=61100110 Win=0 Len=0
195.56.193.26 -> 10.0.0.6 FTP Response: 500 '': command not understood.
10.0.0.6 -> 195.56.193.26 TCP 3497 > ftp [RST] Seq=1414936678 Ack=1414936678 Win=0 Len=0
(my IP = 10.0.0.6).
I can get in with SSHv2 (sftp and scp) okay, but I honestly doubt
the ftp-server has SSL. An ideas?
--gv
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Received on 2003-12-01