Last active
November 2, 2018 09:18
-
-
Save navossoc/7572c7d82243e9f818989e2765e7793a to your computer and use it in GitHub Desktop.
Check if SHA-2 support is available on Windows 7 SP1 (KB3033929)
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
BOOL IsSHA2Supported() | |
{ | |
// Get a handle to the DLL module | |
HMODULE hLib = LoadLibraryA("wintrust.dll"); | |
// If the handle is valid, try to get the function address | |
if (hLib != NULL) | |
{ | |
PVOID fpCryptCATAdminAcquireContext2 = GetProcAddress(hLib, "CryptCATAdminAcquireContext2"); | |
// Free the DLL module | |
FreeLibrary(hLib); | |
return fpCryptCATAdminAcquireContext2 != NULL; | |
} | |
return FALSE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment