From cd238bb7addf5b1f174df47ccc61651a545c4876 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 12 Aug 2026 10:36:20 +0200 Subject: [PATCH] tool_operate: only check for schannel if on windows It can never be true elsewhere. Reported-by: Max Dymond Closes #22552 --- src/tool_operate.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tool_operate.c b/src/tool_operate.c index 213f20b88f..25b7973d2c 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -2168,6 +2168,7 @@ static CURLcode serial_transfers(CURLSH *share) return result; } +#ifdef _WIN32 static CURLcode is_using_schannel(int *pusing) { CURLcode result = CURLE_OK; @@ -2195,6 +2196,14 @@ static CURLcode is_using_schannel(int *pusing) *pusing = using_schannel; return result; } +#else +/* on non-Windows it can never use Schannel */ +static CURLcode is_using_schannel(int *pusing) +{ + *pusing = 0; /* never */ + return CURLE_OK; +} +#endif /* Set the CA cert locations specified in the environment. For Windows if no * environment-specified filename is found then check for CA bundle default