summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-09-06 22:53:42 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-09-07 08:23:00 +0200
commit10009222fedec4f664d80ffb508b236fd75da9da (patch)
treed1665fba627d0ad5d5e1cb4efe468d245c0fd20e
parent6987fcef657710f800b05dd79ff744087b15c73d (diff)
downloadcurl-10009222fedec4f664d80ffb508b236fd75da9da.tar.gz
schannel: avoid switch-cases that go to default anyway
SEC_E_APPLICATION_PROTOCOL_MISMATCH isn't defined in some versions of mingw and would require an ifdef otherwise. Reported-by: Thomas Glanzmann Approved-by: Marc Hörsken Bug: https://curl.haxx.se/mail/lib-2018-09/0020.html Closes #2950
-rw-r--r--lib/vtls/schannel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index e7d1e3dde..f3ed98d59 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -802,6 +802,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex)
failf(data, "schannel: SNI or certificate check failed: %s",
Curl_sspi_strerror(conn, sspi_status));
return CURLE_PEER_FAILED_VERIFICATION;
+ /*
case SEC_E_INVALID_HANDLE:
case SEC_E_INVALID_TOKEN:
case SEC_E_LOGON_DENIED:
@@ -811,6 +812,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex)
case SEC_E_NO_CREDENTIALS:
case SEC_E_UNSUPPORTED_FUNCTION:
case SEC_E_APPLICATION_PROTOCOL_MISMATCH:
+ */
default:
failf(data, "schannel: initial InitializeSecurityContext failed: %s",
Curl_sspi_strerror(conn, sspi_status));
@@ -1039,6 +1041,7 @@ schannel_connect_step2(struct connectdata *conn, int sockindex)
failf(data, "schannel: SNI or certificate check failed: %s",
Curl_sspi_strerror(conn, sspi_status));
return CURLE_PEER_FAILED_VERIFICATION;
+ /*
case SEC_E_INVALID_HANDLE:
case SEC_E_INVALID_TOKEN:
case SEC_E_LOGON_DENIED:
@@ -1048,6 +1051,7 @@ schannel_connect_step2(struct connectdata *conn, int sockindex)
case SEC_E_NO_CREDENTIALS:
case SEC_E_UNSUPPORTED_FUNCTION:
case SEC_E_APPLICATION_PROTOCOL_MISMATCH:
+ */
default:
failf(data, "schannel: next InitializeSecurityContext failed: %s",
Curl_sspi_strerror(conn, sspi_status));