windows: drop two interim, single-use macros

Follow-up to e77d867068

Closes #18114
This commit is contained in:
Viktor Szakats 2025-07-31 00:59:39 +02:00
parent d21e75a6ae
commit b5c245045e
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
3 changed files with 13 additions and 18 deletions

View File

@ -177,7 +177,12 @@ CURLcode Curl_create_sspi_identity(const char *userp, const char *passwdp,
curlx_unicodefree(passwd.tchar_ptr);
/* Setup the identity's flags */
identity->Flags = SECFLAG_WINNT_AUTH_IDENTITY;
identity->Flags = (unsigned long)
#ifdef UNICODE
SEC_WINNT_AUTH_IDENTITY_UNICODE;
#else
SEC_WINNT_AUTH_IDENTITY_ANSI;
#endif
return CURLE_OK;
}

View File

@ -340,14 +340,6 @@ extern PSecurityFunctionTable Curl_pSecFn;
#endif
#endif /* __MINGW32CE__ */
#ifdef UNICODE
# define SECFLAG_WINNT_AUTH_IDENTITY \
(unsigned long)SEC_WINNT_AUTH_IDENTITY_UNICODE
#else
# define SECFLAG_WINNT_AUTH_IDENTITY \
(unsigned long)SEC_WINNT_AUTH_IDENTITY_ANSI
#endif
/*
* Definitions required from ntsecapi.h are directly provided below this point
* to avoid including ntsecapi.h due to a conflict with OpenSSL's safestack.h

View File

@ -73,14 +73,6 @@
#define SCH_DEV(x) do { } while(0)
#endif
#ifdef HAS_CLIENT_CERT_PATH
#ifdef UNICODE
#define CURL_CERT_STORE_PROV_SYSTEM CERT_STORE_PROV_SYSTEM_W
#else
#define CURL_CERT_STORE_PROV_SYSTEM CERT_STORE_PROV_SYSTEM_A
#endif
#endif
/* Offered by mingw-w64 v8+. MS SDK 7.0A+. */
#ifndef SP_PROT_TLS1_0_CLIENT
#define SP_PROT_TLS1_0_CLIENT SP_PROT_TLS1_CLIENT
@ -692,7 +684,13 @@ schannel_acquire_credential_handle(struct Curl_cfilter *cf,
}
else {
cert_store =
CertOpenStore(CURL_CERT_STORE_PROV_SYSTEM, 0,
CertOpenStore(
#ifdef UNICODE
CERT_STORE_PROV_SYSTEM_W,
#else
CERT_STORE_PROV_SYSTEM_A,
#endif
0,
(HCRYPTPROV)NULL,
CERT_STORE_OPEN_EXISTING_FLAG | cert_store_name,
cert_store_path);