]> granicus.if.org Git - apache/commitdiff
Make a mod_auth_digest build fail in a less mysterious way on systems
authorJeff Trawick <trawick@apache.org>
Thu, 8 Feb 2001 14:39:31 +0000 (14:39 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 8 Feb 2001 14:39:31 +0000 (14:39 +0000)
without APR random number support (e.g., a stock Tru64 system).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88023 13f79535-47bb-0310-9956-ffa450edef68

modules/aaa/mod_auth_digest.c

index 12952786c1493fca24e225f233d57dd21e01be1f..be071da380d644a1de149af8039983ee4c1da346 100644 (file)
@@ -299,8 +299,11 @@ static void initialize_secret(server_rec *s)
     ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, s,
                 "Digest: generating secret for digest authentication ...");
 
-    /* TODO - make sure this func works (compiles?) on win32 */
+#if APR_HAS_RANDOM
     status = apr_generate_random_bytes(secret, sizeof(secret));
+#else
+#error APR random number support is missing; you probably need to install the truerand library.
+#endif
 
     if(!(status == APR_SUCCESS)) {
         char buf[120];