mirror of
https://github.com/moparisthebest/curl
synced 2024-11-16 14:35:03 -05:00
gtls: Values stored to but never read
Detected by clang-tidy Closes #3176
This commit is contained in:
parent
bbce45fb00
commit
ebfe02f73c
@ -756,7 +756,6 @@ gtls_connect_step1(struct connectdata *conn,
|
|||||||
switch(SSL_CONN_CONFIG(version)) {
|
switch(SSL_CONN_CONFIG(version)) {
|
||||||
case CURL_SSLVERSION_SSLv3:
|
case CURL_SSLVERSION_SSLv3:
|
||||||
prioritylist = GNUTLS_CIPHERS ":-VERS-TLS-ALL:+VERS-SSL3.0";
|
prioritylist = GNUTLS_CIPHERS ":-VERS-TLS-ALL:+VERS-SSL3.0";
|
||||||
sni = false;
|
|
||||||
break;
|
break;
|
||||||
case CURL_SSLVERSION_DEFAULT:
|
case CURL_SSLVERSION_DEFAULT:
|
||||||
case CURL_SSLVERSION_TLSv1:
|
case CURL_SSLVERSION_TLSv1:
|
||||||
@ -1153,7 +1152,7 @@ gtls_connect_step3(struct connectdata *conn,
|
|||||||
return CURLE_SSL_INVALIDCERTSTATUS;
|
return CURLE_SSL_INVALIDCERTSTATUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = gnutls_ocsp_resp_get_single(ocsp_resp, 0, NULL, NULL, NULL, NULL,
|
(void)gnutls_ocsp_resp_get_single(ocsp_resp, 0, NULL, NULL, NULL, NULL,
|
||||||
&status, NULL, NULL, NULL, &reason);
|
&status, NULL, NULL, NULL, &reason);
|
||||||
|
|
||||||
switch(status) {
|
switch(status) {
|
||||||
@ -1640,7 +1639,7 @@ static int Curl_gtls_shutdown(struct connectdata *conn, int sockindex)
|
|||||||
ssize_t result;
|
ssize_t result;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
struct Curl_easy *data = conn->data;
|
struct Curl_easy *data = conn->data;
|
||||||
int done = 0;
|
bool done = FALSE;
|
||||||
char buf[120];
|
char buf[120];
|
||||||
|
|
||||||
/* This has only been tested on the proftpd server, and the mod_tls code
|
/* This has only been tested on the proftpd server, and the mod_tls code
|
||||||
@ -1664,7 +1663,7 @@ static int Curl_gtls_shutdown(struct connectdata *conn, int sockindex)
|
|||||||
case 0:
|
case 0:
|
||||||
/* This is the expected response. There was no data but only
|
/* This is the expected response. There was no data but only
|
||||||
the close notify alert */
|
the close notify alert */
|
||||||
done = 1;
|
done = TRUE;
|
||||||
break;
|
break;
|
||||||
case GNUTLS_E_AGAIN:
|
case GNUTLS_E_AGAIN:
|
||||||
case GNUTLS_E_INTERRUPTED:
|
case GNUTLS_E_INTERRUPTED:
|
||||||
@ -1672,21 +1671,20 @@ static int Curl_gtls_shutdown(struct connectdata *conn, int sockindex)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
retval = -1;
|
retval = -1;
|
||||||
done = 1;
|
done = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(0 == what) {
|
else if(0 == what) {
|
||||||
/* timeout */
|
/* timeout */
|
||||||
failf(data, "SSL shutdown timeout");
|
failf(data, "SSL shutdown timeout");
|
||||||
done = 1;
|
done = TRUE;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* anything that gets here is fatally bad */
|
/* anything that gets here is fatally bad */
|
||||||
failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
|
failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
|
||||||
retval = -1;
|
retval = -1;
|
||||||
done = 1;
|
done = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gnutls_deinit(BACKEND->session);
|
gnutls_deinit(BACKEND->session);
|
||||||
|
Loading…
Reference in New Issue
Block a user