From 540d341b386d2865c14438553e734b4ccdd510ee Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 20 Feb 2025 17:46:57 +0100 Subject: [PATCH] schannel: deduplicate Windows Vista detection curl detects Vista as part of its global initialization. Use that result instead of detecting it again in Schannel, to save some cycles and API calls. Follow-up to 46e97b10ba917aed55f079b89c1dfe54955a4a62 #16400 Closes #16408 --- lib/vtls/schannel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index ffd681bd38..99ce5cb0c8 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -53,6 +53,7 @@ #include "x509asn1.h" #include "curl_printf.h" #include "multiif.h" +#include "system_win32.h" #include "version_win32.h" #include "rand.h" #include "strparse.h" @@ -651,8 +652,7 @@ schannel_acquire_credential_handle(struct Curl_cfilter *cf, else pszPassword[0] = 0; - if(curlx_verify_windows_version(6, 0, 0, PLATFORM_WINNT, - VERSION_GREATER_THAN_EQUAL)) + if(Curl_isVistaOrGreater) cert_store = PFXImportCertStore(&datablob, pszPassword, PKCS12_NO_PERSIST_KEY); else -- 2.47.3