You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@locus.apache.org on 2000/07/31 21:51:24 UTC
cvs commit: apache-2.0/src/lib/apr/misc/win32 rand.c
stoddard 00/07/31 12:51:23
Modified: src/lib/apr/misc/win32 rand.c
Log:
Win32: Return error codes on ap_generate_random()
Revision Changes Path
1.4 +2 -10 apache-2.0/src/lib/apr/misc/win32/rand.c
Index: rand.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/win32/rand.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- rand.c 2000/04/22 06:16:37 1.3
+++ rand.c 2000/07/31 19:51:22 1.4
@@ -61,18 +61,10 @@
HCRYPTPROV hProv;
if (!CryptAcquireContext(&hProv,NULL,NULL,PROV_RSA_FULL,0)) {
- /* ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
- "Digest: Error acquiring context. Errno = %d",
- GetLastError());
- exit(EXIT_FAILURE);*/
- return 1;
+ return GetLastError();
}
if (!CryptGenRandom(hProv,length,buf)) {
- /* ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
- "Digest: Error generating secret. Errno = %d",
- GetLastError());
- exit(EXIT_FAILURE);*/
- return 1;
+ return GetLastError();
}
return APR_SUCCESS;
}