]> granicus.if.org Git - apache/commitdiff
mod_ssl: Check for RAND_egd() at configure time and only use it if present.
authorStefan Sperling <stsp@apache.org>
Sat, 18 Apr 2015 17:03:47 +0000 (17:03 +0000)
committerStefan Sperling <stsp@apache.org>
Sat, 18 Apr 2015 17:03:47 +0000 (17:03 +0000)
Fixes the build with LibreSSL which does not provide this function.

Submitted by: Bernard Spil <pil.oss gmail com>, stsp
Committed by: stsp

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

acinclude.m4
modules/ssl/ssl_engine_rand.c

index dfcb3c9b0368e972dbdfa2cfe5a35f1e9f00c864..c6ca3fe7fa18398655826f92687e40cb1d034b26 100644 (file)
@@ -595,7 +595,7 @@ AC_DEFUN(APACHE_CHECK_OPENSSL,[
       liberrors=""
       AC_CHECK_HEADERS([openssl/engine.h])
       AC_CHECK_FUNCS([SSLeay_version SSL_CTX_new], [], [liberrors="yes"])
-      AC_CHECK_FUNCS([ENGINE_init ENGINE_load_builtin_engines])
+      AC_CHECK_FUNCS([ENGINE_init ENGINE_load_builtin_engines RAND_egd])
       if test "x$liberrors" != "x"; then
         AC_MSG_WARN([OpenSSL libraries are unusable])
       fi
index a5893e1561ee02f1bf786a2999e031b40c9ce154..3b6bf076133e5402c1a237ce6a6953f2f2154e72 100644 (file)
@@ -86,6 +86,7 @@ int ssl_rand_seed(server_rec *s, apr_pool_t *p, ssl_rsctx_t nCtx, char *prefix)
                 nDone += ssl_rand_feedfp(p, fp, pRandSeed->nBytes);
                 ssl_util_ppclose(s, p, fp);
             }
+#ifdef HAVE_RAND_EGD
             else if (pRandSeed->nSrc == SSL_RSSRC_EGD) {
                 /*
                  * seed in contents provided by the external
@@ -95,6 +96,7 @@ int ssl_rand_seed(server_rec *s, apr_pool_t *p, ssl_rsctx_t nCtx, char *prefix)
                     continue;
                 nDone += n;
             }
+#endif
             else if (pRandSeed->nSrc == SSL_RSSRC_BUILTIN) {
                 struct {
                     time_t t;