windows: document toolchain support for some macros#18085
Closed
vszakats wants to merge 20 commits intocurl:masterfrom
Closed
windows: document toolchain support for some macros#18085vszakats wants to merge 20 commits intocurl:masterfrom
vszakats wants to merge 20 commits intocurl:masterfrom
Conversation
6aa8246 to
8a2811e
Compare
https://learn.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-pfximportcertstore ``` D:/a/curl/curl/lib/vtls/schannel.c: In function 'schannel_acquire_credential_handle': D:/a/curl/curl/lib/vtls/schannel.c:651:24: error: implicit declaration of function 'PFXImportCertStore' [-Wimplicit-function-declaration] 651 | cert_store = PFXImportCertStore(&datablob, pszPassword, | ^~~~~~~~~~~~~~~~~~ D:/a/curl/curl/lib/vtls/schannel.c:651:24: error: nested extern declaration of 'PFXImportCertStore' [-Werror=nested-externs] D:/a/curl/curl/lib/vtls/schannel.c:651:22: error: assignment to 'HCERTSTORE' {aka 'void *'} from 'int' makes pointer from integer without a cast [-Wint-conversion] 651 | cert_store = PFXImportCertStore(&datablob, pszPassword, | ^ D:/a/curl/curl/lib/vtls/schannel.c:654:22: error: assignment to 'HCERTSTORE' {aka 'void *'} from 'int' makes pointer from integer without a cast [-Wint-conversion] 654 | cert_store = PFXImportCertStore(&datablob, pszPassword, 0); | ^ D:/a/curl/curl/lib/vtls/schannel.c:717:11: error: implicit declaration of function 'CryptStringToBinary' [-Wimplicit-function-declaration] 717 | if(!CryptStringToBinary(cert_thumbprint_str, | ^~~~~~~~~~~~~~~~~~~ D:/a/curl/curl/lib/vtls/schannel.c:717:11: error: nested extern declaration of 'CryptStringToBinary' [-Werror=nested-externs] D:/a/curl/curl/lib/vtls/schannel.c:719:31: error: 'CRYPT_STRING_HEX' undeclared (first use in this function) 719 | CRYPT_STRING_HEX, | ^~~~~~~~~~~~~~~~ D:/a/curl/curl/lib/vtls/schannel.c:719:31: note: each undeclared identifier is reported only once for each function it appears in cc1.exe: all warnings being treated as errors ``` https://github.com/curl/curl/actions/runs/16603975843/job/46970895223?pr=18085#step:10:24
Only used in Vista+ builds. Also by OpenWatcom 2: https://github.com/open-watcom/open-watcom-v2/blob/ce6c37eb29f3fda95f9c4e8e37dee866b8c4e496/bld/w32api/include/bcrypt.mh
https://github.com/curl/curl/actions/runs/16623485827/job/47033528073?pr=18039 https://ci.appveyor.com/project/curlorg/curl/builds/52486466 Also winbuild and VS Project File builds need it for some reason. This is really odd.
This reverts commit 3259f89.
The first currently supported (VS2008) Beyond 7.1A it isn't precise, I only have Win10 10.0.16299.15 SDK to verify.
vszakats
added a commit
that referenced
this pull request
Jul 31, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The oldest MS SDK I checked is 6.0A (VS2008). Versions are approximate
beyond 7.1A. I only have two Win10 SDKs to verify:
10.0.16299.0 (VS2017-15.4) and 10.0.22621.0 (VS2022).
Ref: https://en.wikipedia.org/wiki/Microsoft_Windows_SDK
Ref: https://developer.microsoft.com/windows/downloads/sdk-archive/index-legacy (mostly recent versions)