mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 09:21:50 -05:00
ftp: don't do ssl_shutdown instead of ssl_close
The shutdown function is for downgrading a connection from TLS to plain, and this is not requested here. Have ssl_close reset the TLS connection state. This partially reverts commit f002c850d98d Reported-by: Rasmus Melchior Jacobsen Reported-by: Denis Goleshchikhin Fixes #5797
This commit is contained in:
parent
421cf55ab2
commit
aecce3551c
@ -3251,9 +3251,9 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(conn->ssl[SECONDARYSOCKET].use) {
|
if(conn->ssl[SECONDARYSOCKET].use) {
|
||||||
/* The secondary socket used SSL so we must close down that part first
|
/* The secondary socket is using SSL so we must close down that part
|
||||||
before we close the socket for real */
|
first before we close the socket for real */
|
||||||
result = Curl_ssl_shutdown(conn, SECONDARYSOCKET);
|
Curl_ssl_close(conn, SECONDARYSOCKET);
|
||||||
|
|
||||||
/* Note that we keep "use" set to TRUE since that (next) connection is
|
/* Note that we keep "use" set to TRUE since that (next) connection is
|
||||||
still requested to use SSL */
|
still requested to use SSL */
|
||||||
|
@ -621,6 +621,7 @@ void Curl_ssl_close(struct connectdata *conn, int sockindex)
|
|||||||
{
|
{
|
||||||
DEBUGASSERT((sockindex <= 1) && (sockindex >= -1));
|
DEBUGASSERT((sockindex <= 1) && (sockindex >= -1));
|
||||||
Curl_ssl->close_one(conn, sockindex);
|
Curl_ssl->close_one(conn, sockindex);
|
||||||
|
conn->ssl[sockindex].state = ssl_connection_none;
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex)
|
CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user