]> granicus.if.org Git - apache/commitdiff
mod_ssl: Make the config parser complain if SSLRandomSeed specifies
authorStefan Sperling <stsp@apache.org>
Wed, 22 Apr 2015 16:39:20 +0000 (16:39 +0000)
committerStefan Sperling <stsp@apache.org>
Wed, 22 Apr 2015 16:39:20 +0000 (16:39 +0000)
the Entropy Gathering Daemon (EGD) as source while the underlying
SSL library does not support EGD (e.g. in case of LibreSSL).

Suggested and reviewed by: kbrand

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

modules/ssl/ssl_engine_config.c

index cabe29ed9067d6fd29a4c1acef9a328aeed6dd47..7af7b907c4d57bde94f059af50debde8815aedb3 100644 (file)
@@ -574,8 +574,15 @@ const char *ssl_cmd_SSLRandomSeed(cmd_parms *cmd,
         seed->cpPath = ap_server_root_relative(mc->pPool, arg2+5);
     }
     else if ((arg2len > 4) && strEQn(arg2, "egd:", 4)) {
+#ifdef HAVE_RAND_EGD
         seed->nSrc   = SSL_RSSRC_EGD;
         seed->cpPath = ap_server_root_relative(mc->pPool, arg2+4);
+#else
+        return apr_pstrcat(cmd->pool, "Invalid SSLRandomSeed entropy source `",
+                           arg2, "': This version of " MODSSL_LIBRARY_NAME
+                           " does not support the Entropy Gathering Daemon "
+                           "(EGD).", NULL);
+#endif
     }
     else if (strcEQ(arg2, "builtin")) {
         seed->nSrc   = SSL_RSSRC_BUILTIN;