-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
schannel: compile fix for Windows SDK 8+ #353
Conversation
GetVersion was deprecated in Windows SDK 8.0, which is treated as an error by default. This has been cleaned up in connect.c and curl_sspi.c, but curl@3e7ec1e re-introduced a call to GetVersion. As in the other places where GetVersion(Ex) was used, this can be changed to use VerifyVersionInfo, which is not deprecated. I don't think a fallback version for Windows < 2000 is necessary here as SChannel was introduced in Windows 2000.
You mean the warning from |
Yes, that's what I mean. Thanks, I didn't know about that workaround! |
VerifyVersionInfo dwTypeMask value VER_MAJORVERSION says:
That's an odd requirement. I don't recall having encountered this API function but I imagine as Windows 10 makes inroads I'll have to deal with it. I've modified your commit to conform to the API specification. As I said I'm unfamiliar with this spec so if I've misinterpreted it please let me know. |
Looks good, thanks a lot @jay! Strange, I've used that function quite a few times in production code since Visual Studio 2012 came out and I was relatively sure I read the documentation, but I can't remember that requirement. The other two calls to VerifyVersionInfo in libcurl also only check for the major version, but your version is definitely correct according to the documentation. |
- Fix the VerifyVersionInfo calls, which we use to test for the OS major version, to also test for the minor version as well as the service pack major and minor versions. MSDN: "If you are testing the major version, you must also test the minor version and the service pack major and minor versions." https://msdn.microsoft.com/en-us/library/windows/desktop/ms725492.aspx Bug: #353 (comment) Reported-by: Marcel Raad <MarcelRaad@users.noreply.github.com>
Thanks, landed in 7a8e861 and 40c921f. |
- Fix the VerifyVersionInfo calls, which we use to test for the OS major version, to also test for the minor version as well as the service pack major and minor versions. MSDN: "If you are testing the major version, you must also test the minor version and the service pack major and minor versions." https://msdn.microsoft.com/en-us/library/windows/desktop/ms725492.aspx Bug: curl#353 (comment) Reported-by: Marcel Raad <MarcelRaad@users.noreply.github.com>
GetVersion was deprecated in Windows SDK 8.0, which is treated as an error by default. This has been cleaned up in connect.c and curl_sspi.c, but 3e7ec1e re-introduced a call to GetVersion.
As in the other places where GetVersion(Ex) was used, this can be changed to use VerifyVersionInfo, which is not deprecated. I don't think a fallback version for Windows < 2000 is necessary here as SChannel was introduced in Windows 2000.