Correct error code for CCC/SSL shutdown failure
This commit is contained in:
Родитель
55123424c8
Коммит
d465199411
|
@ -397,8 +397,8 @@ typedef enum {
|
||||||
generic so the error message will be of
|
generic so the error message will be of
|
||||||
interest when this has happened */
|
interest when this has happened */
|
||||||
|
|
||||||
CURLE_FTP_SSL_CCC_FAILED, /* 80 - Failed to clear the FTP command
|
CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL
|
||||||
channel */
|
connection */
|
||||||
CURL_LAST /* never use! */
|
CURL_LAST /* never use! */
|
||||||
} CURLcode;
|
} CURLcode;
|
||||||
|
|
||||||
|
|
|
@ -2563,8 +2563,10 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
|
||||||
/* First shut down the SSL layer (note: this call will block) */
|
/* First shut down the SSL layer (note: this call will block) */
|
||||||
result = Curl_ssl_shutdown(conn, FIRSTSOCKET);
|
result = Curl_ssl_shutdown(conn, FIRSTSOCKET);
|
||||||
|
|
||||||
if(result)
|
if(result) {
|
||||||
return CURLE_FTP_SSL_CCC_FAILED;
|
failf(conn->data, "Failed to clear the command channel (CCC)");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/* Then continue as normal */
|
/* Then continue as normal */
|
||||||
result = ftp_state_pwd(conn);
|
result = ftp_state_pwd(conn);
|
||||||
|
|
|
@ -401,10 +401,12 @@ CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex)
|
||||||
{
|
{
|
||||||
if(conn->ssl[sockindex].use) {
|
if(conn->ssl[sockindex].use) {
|
||||||
#ifdef USE_SSLEAY
|
#ifdef USE_SSLEAY
|
||||||
return Curl_ossl_shutdown(conn, sockindex);
|
if(Curl_ossl_shutdown(conn, sockindex))
|
||||||
|
return CURLE_SSL_SHUTDOWN_FAILED;
|
||||||
#else
|
#else
|
||||||
#ifdef USE_GNUTLS
|
#ifdef USE_GNUTLS
|
||||||
return Curl_gtls_shutdown(conn, sockindex);
|
if(Curl_gtls_shutdown(conn, sockindex))
|
||||||
|
return CURLE_SSL_SHUTDOWN_FAILED;
|
||||||
#else
|
#else
|
||||||
(void)conn;
|
(void)conn;
|
||||||
(void)sockindex;
|
(void)sockindex;
|
||||||
|
|
|
@ -244,8 +244,8 @@ curl_easy_strerror(CURLcode error)
|
||||||
case CURLE_FTP_SSL_FAILED:
|
case CURLE_FTP_SSL_FAILED:
|
||||||
return "Requested FTP SSL level failed";
|
return "Requested FTP SSL level failed";
|
||||||
|
|
||||||
case CURLE_FTP_SSL_CCC_FAILED:
|
case CURLE_SSL_SHUTDOWN_FAILED:
|
||||||
return "Failed to clear the FTP command channel";
|
return "Failed to shut down the SSL connection";
|
||||||
|
|
||||||
case CURLE_SEND_FAIL_REWIND:
|
case CURLE_SEND_FAIL_REWIND:
|
||||||
return "Send failed since rewinding of the data stream failed";
|
return "Send failed since rewinding of the data stream failed";
|
||||||
|
|
Загрузка…
Ссылка в новой задаче