wrowe 01/12/28 19:33:49
Modified: misc/win32 rand.c
Log:
Tickle the Win32 rand generator so it works on W2K
Revision Changes Path
1.11 +3 -2 apr/misc/win32/rand.c
Index: rand.c
===================================================================
RCS file: /home/cvs/apr/misc/win32/rand.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- rand.c 16 Feb 2001 04:15:58 -0000 1.10
+++ rand.c 29 Dec 2001 03:33:49 -0000 1.11
@@ -62,10 +62,11 @@
HCRYPTPROV hProv;
apr_status_t res = APR_SUCCESS;
- if (!CryptAcquireContext(&hProv,NULL,NULL,PROV_RSA_FULL,0)) {
+ if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL,
+ CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) {
return apr_get_os_error();
}
- if (!CryptGenRandom(hProv,length,buf)) {
+ if (!CryptGenRandom(hProv, length, buf)) {
res = apr_get_os_error();
}
CryptReleaseContext(hProv, 0);
|