mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
CURLFTPSSL_ALL should make sure that the transfer fails if the data connection
isn't set to encrypted properly
This commit is contained in:
parent
4435e3b269
commit
c78ee11c41
@ -677,12 +677,14 @@ CURLcode Curl_ftp_connect(struct connectdata *conn)
|
|||||||
if(result)
|
if(result)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
if(ftpcode == 200)
|
if(ftpcode/100 == 2)
|
||||||
/* We have enabled SSL for the data connection! */
|
/* We have enabled SSL for the data connection! */
|
||||||
conn->ssl[SECONDARYSOCKET].use = TRUE;
|
conn->ssl[SECONDARYSOCKET].use = TRUE;
|
||||||
|
|
||||||
/* FTP servers typically responds with 500 if they decide to reject
|
/* FTP servers typically responds with 500 if they decide to reject
|
||||||
our 'P' request */
|
our 'P' request */
|
||||||
|
else if(data->set.ftp_ssl> CURLFTPSSL_CONTROL)
|
||||||
|
/* we failed and bails out */
|
||||||
|
return CURLE_FTP_SSL_FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user