svn rev #25297: trunk/src/lib/crypto/krb/
ghudson@MIT.EDU
ghudson at MIT.EDU
Tue Oct 4 11:11:46 EDT 2011
http://src.mit.edu/fisheye/changelog/krb5/?cs=25297
Commit By: ghudson
Log Message:
Improve k5_get_os_entropy for Windows.
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.
Changed Files:
U trunk/src/lib/crypto/krb/prng.c
Modified: trunk/src/lib/crypto/krb/prng.c
===================================================================
--- trunk/src/lib/crypto/krb/prng.c 2011-10-03 20:15:27 UTC (rev 25296)
+++ trunk/src/lib/crypto/krb/prng.c 2011-10-04 15:11:45 UTC (rev 25297)
@@ -41,7 +41,8 @@
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);
More information about the cvs-krb5
mailing list