From: Jeff Trawick Date: Thu, 8 Feb 2001 14:39:31 +0000 (+0000) Subject: Make a mod_auth_digest build fail in a less mysterious way on systems X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a04a7d1463bb10dd98e79e8bd8efd6f49194fd8;p=apache Make a mod_auth_digest build fail in a less mysterious way on systems 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 --- diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c index 12952786c1..be071da380 100644 --- a/modules/aaa/mod_auth_digest.c +++ b/modules/aaa/mod_auth_digest.c @@ -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];