mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:03:31 +03:00
tool_operate: limit is_using_schannel() call to Windows
Follow-up to cd238bb7ad #22552
Closes #22568
This commit is contained in:
parent
dea00a6d73
commit
9d034539ec
1 changed files with 4 additions and 7 deletions
|
|
@ -2196,13 +2196,6 @@ 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
|
||||
|
|
@ -2220,15 +2213,19 @@ static CURLcode cacertpaths(struct OperationConfig *config)
|
|||
{
|
||||
char *env;
|
||||
CURLcode result;
|
||||
#ifdef _WIN32
|
||||
int using_schannel;
|
||||
#endif
|
||||
|
||||
if(!feature_ssl || config->cacert || config->capath ||
|
||||
(config->insecure_ok && (!config->doh_url || config->doh_insecure_ok)))
|
||||
return CURLE_OK;
|
||||
|
||||
#ifdef _WIN32
|
||||
result = is_using_schannel(&using_schannel);
|
||||
if(result || using_schannel)
|
||||
return result;
|
||||
#endif
|
||||
|
||||
env = curl_getenv("CURL_CA_BUNDLE");
|
||||
if(env) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue