When acquiring a crypto context for CryptGenRandom, pass
CRYPT_VERIFYCONTEXT to indicate that we don't need access to private
keys. Appears to make OS entropy work on Windows XP.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25297
dc483132-0cff-0310-8789-
dd5450dbe970
krb5_boolean result;
HCRYPTPROV provider;
- if (!CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL, 0))
+ if (!CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL,
+ CRYPT_VERIFYCONTEXT))
return FALSE;
result = CryptGenRandom(provider, len, buf);
(void)CryptReleaseContext(provider, 0);