← Commit list

3692cd837e

Daniel Stenberg
Daniel Stenberg
2025-10-23
SUCCESS Duration: 152s

Subject

schannel: replace a run-time condition with an assert

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/vtls/schannel.c+2 -6
@@ -1711,15 +1711,11 @@ schannel_recv_renegotiate(struct Curl_cfilter *cf, struct Curl_easy *data,
failf(data, "schannel: unexpected call to schannel_recv_renegotiate");
return CURLE_SSL_CONNECT_ERROR;
}
-
+ DEBUGASSERT(caller <= SCH_RENEG_CALLER_IS_SEND);
if(caller == SCH_RENEG_CALLER_IS_RECV)
SCH_DEV(infof(data, "schannel: renegotiation caller is schannel_recv"));
- else if(caller == SCH_RENEG_CALLER_IS_SEND)
+ else
SCH_DEV(infof(data, "schannel: renegotiation caller is schannel_send"));
- else {
- failf(data, "schannel: unknown caller for schannel_recv_renegotiate");
- return CURLE_SSL_CONNECT_ERROR;
- }
sockfd = Curl_conn_cf_get_socket(cf, data);