From b8c8e7349fef49e9027080632e9581f0c76d974b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 7 Mar 2006 22:28:08 +0000 Subject: [PATCH] Peter Heuchert made sure the CURLFTPSSL_CONTROL setting for CURLOPT_FTP_SSL is used properly. --- CHANGES | 4 ++++ RELEASE-NOTES | 3 ++- lib/ftp.c | 6 ++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index a41ae9bd6..bb1c24d25 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,10 @@ Changelog +Daniel (7 March 2006) +- Peter Heuchert made sure the CURLFTPSSL_CONTROL setting for CURLOPT_FTP_SSL + is used properly. + Daniel (6 March 2006) - Lots of users on Windows have reported getting the "SSL: couldn't set callback" error message so I've now made the setting of that callback not be diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c0fc1610e..a54f8d9dd 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -15,6 +15,7 @@ This release includes the following changes: This release includes the following bugfixes: + o the CURLFTPSSL_CONTROL setting for CURLOPT_FTP_SSL is acknowledged o "SSL: couldn't set callback" is now a less serious problem o Interix build fix o fixed "hang" when out of file handles at start @@ -27,6 +28,6 @@ Other curl-related news since the previous public release: This release would not have looked like this without help, code, reports and advice from friends like these: - Gisle Vanem, Dan Fandrich, Thomas Klausner, Todd Vierling + Gisle Vanem, Dan Fandrich, Thomas Klausner, Todd Vierling, Peter Heuchert Thanks! (and sorry if I forgot to mention someone) diff --git a/lib/ftp.c b/lib/ftp.c index da2aeb9e2..3d29b349f 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -2456,7 +2456,8 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) 2)Private (requested by 'PROT P') */ if(!conn->ssl[SECONDARYSOCKET].use) { - NBFTPSENDF(conn, "PROT %c", 'P'); + NBFTPSENDF(conn, "PROT %c", + data->set.ftp_ssl == CURLFTPSSL_CONTROL ? 'C' : 'P'); state(conn, FTP_PROT); } else { @@ -2470,7 +2471,8 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) case FTP_PROT: if(ftpcode/100 == 2) /* We have enabled SSL for the data connection! */ - conn->ssl[SECONDARYSOCKET].use = TRUE; + conn->ssl[SECONDARYSOCKET].use = + data->set.ftp_ssl > CURLFTPSSL_CONTROL; /* FTP servers typically responds with 500 if they decide to reject our 'P' request */ else if(data->set.ftp_ssl> CURLFTPSSL_CONTROL)