mirror of
https://github.com/moparisthebest/curl
synced 2024-11-14 21:45:13 -05:00
schannel: Use GetVersionEx() when VerifyVersionInfo() isn't available
Regression from commit 7a8e861a5
as highlighted in the msys autobuilds.
This commit is contained in:
parent
c90e348579
commit
8d17117683
@ -1120,7 +1120,23 @@ cleanup:
|
|||||||
*/
|
*/
|
||||||
if(len && !connssl->decdata_offset && connssl->recv_connection_closed &&
|
if(len && !connssl->decdata_offset && connssl->recv_connection_closed &&
|
||||||
!connssl->recv_sspi_close_notify) {
|
!connssl->recv_sspi_close_notify) {
|
||||||
BOOL isWin2k;
|
bool isWin2k = FALSE;
|
||||||
|
|
||||||
|
#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_WIN2K) || \
|
||||||
|
(_WIN32_WINNT < _WIN32_WINNT_WIN2K)
|
||||||
|
OSVERSIONINFO osver;
|
||||||
|
|
||||||
|
memset(&osver, 0, sizeof(osver));
|
||||||
|
osver.dwOSVersionInfoSize = sizeof(osver);
|
||||||
|
|
||||||
|
/* Find out the Windows version */
|
||||||
|
if(!GetVersionEx(&osver))
|
||||||
|
return CURLE_FAILED_INIT;
|
||||||
|
|
||||||
|
/* Verify the version number is 5.0 */
|
||||||
|
if(osver.dwMajorVersion == 5 && osver.dwMinorVersion == 0)
|
||||||
|
isWin2k = TRUE;
|
||||||
|
#else
|
||||||
ULONGLONG cm;
|
ULONGLONG cm;
|
||||||
OSVERSIONINFOEX osver;
|
OSVERSIONINFOEX osver;
|
||||||
|
|
||||||
@ -1133,10 +1149,11 @@ cleanup:
|
|||||||
cm = VerSetConditionMask(cm, VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);
|
cm = VerSetConditionMask(cm, VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);
|
||||||
cm = VerSetConditionMask(cm, VER_SERVICEPACKMINOR, VER_GREATER_EQUAL);
|
cm = VerSetConditionMask(cm, VER_SERVICEPACKMINOR, VER_GREATER_EQUAL);
|
||||||
|
|
||||||
isWin2k = VerifyVersionInfo(&osver,
|
if(VerifyVersionInfo(&osver, (VER_MAJORVERSION | VER_MINORVERSION |
|
||||||
(VER_MAJORVERSION | VER_MINORVERSION |
|
|
||||||
VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR),
|
VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR),
|
||||||
cm);
|
cm))
|
||||||
|
isWin2k = TRUE;
|
||||||
|
#endif
|
||||||
|
|
||||||
if(isWin2k && sspi_status == SEC_E_OK)
|
if(isWin2k && sspi_status == SEC_E_OK)
|
||||||
connssl->recv_sspi_close_notify = true;
|
connssl->recv_sspi_close_notify = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user