crypt32: Check the result of CryptAcquireContextW() when initializing default provider.
This commit is contained in:
parent
15d7b7b777
commit
7223d8b6d2
|
@ -64,8 +64,9 @@ HCRYPTPROV CRYPT_GetDefaultProvider(void)
|
|||
{
|
||||
HCRYPTPROV prov;
|
||||
|
||||
CryptAcquireContextW(&prov, NULL, MS_ENHANCED_PROV_W, PROV_RSA_FULL,
|
||||
CRYPT_VERIFYCONTEXT);
|
||||
if (!CryptAcquireContextW(&prov, NULL, MS_ENHANCED_PROV_W, PROV_RSA_FULL,
|
||||
CRYPT_VERIFYCONTEXT))
|
||||
return hDefProv;
|
||||
InterlockedCompareExchangePointer((PVOID *)&hDefProv, (PVOID)prov,
|
||||
NULL);
|
||||
if (hDefProv != prov)
|
||||
|
|
Loading…
Reference in New Issue