curl-library
Re: implicit SSL with FileZilla server Unknown SSL protocol error 1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
Date: Mon, 01 Dec 2008 13:53:09 -0500
On Fri, Nov 28, 2008 at 4:51 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Fri, 28 Nov 2008, Ken Hirsch wrote:
>> Should I send a patch with this change?
>
> Yes thanks, please do!
--- curl-7.19.2/lib/ftp.c 2008-11-06 13:30:18.000000000 -0800
+++ curl-7.19.2-changed/lib/ftp.c 2008-12-01 09:31:36.909418000 -0800
@@ -150,9 +150,6 @@
static CURLcode ftp_doing(struct connectdata *conn,
bool *dophase_done);
static CURLcode ftp_setup_connection(struct connectdata * conn);
-#ifdef USE_SSL
-static CURLcode ftps_setup_connection(struct connectdata * conn);
-#endif
/* easy-to-use macro: */
#define FTPSENDF(x,y,z) if((result = Curl_ftpsendf(x,y,z)) !=
CURLE_OK) \
@@ -189,7 +186,7 @@
const struct Curl_handler Curl_handler_ftps = {
"FTPS", /* scheme */
- ftps_setup_connection, /* setup_connection */
+ ftp_setup_connection, /* setup_connection */
ftp_do, /* do_it */
ftp_done, /* done */
ftp_nextconnect, /* do_more */
@@ -2687,24 +2684,9 @@
break;
case FTP_PBSZ:
- /* FIX: check response code */
-
- /* For TLS, the data connection can have one of two security levels.
-
- 1) Clear (requested by 'PROT C')
-
- 2)Private (requested by 'PROT P')
- */
- if(!conn->ssl[SECONDARYSOCKET].use) {
- NBFTPSENDF(conn, "PROT %c",
- data->set.ftp_ssl == CURLUSESSL_CONTROL ? 'C' : 'P');
- state(conn, FTP_PROT);
- }
- else {
- result = ftp_state_pwd(conn);
- if(result)
- return result;
- }
+ NBFTPSENDF(conn, "PROT %c",
+ data->set.ftp_ssl == CURLUSESSL_CONTROL ? 'C' : 'P');
+ state(conn, FTP_PROT);
break;
@@ -4184,14 +4166,4 @@
return CURLE_OK;
}
-#ifdef USE_SSL
-static CURLcode ftps_setup_connection(struct connectdata * conn)
-{
- struct SessionHandle *data = conn->data;
-
- conn->ssl[SECONDARYSOCKET].use = data->set.ftp_ssl != CURLUSESSL_CONTROL;
- return ftp_setup_connection(conn);
-}
-#endif
-
#endif /* CURL_DISABLE_FTP */
Received on 2008-12-01