Commit 7a04a7d1 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

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
parent 848df7d6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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];