|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75725 ./configure: detecting RAND_egd
Submitted: 2017-12-23 13:17 UTC Modified: 2020-10-14 14:21 UTC
From: dpa-bugs at aegee dot org Assigned:
Status: Verified Package: *Compile Issues
PHP Version: 7.1.12 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: dpa-bugs at aegee dot org
New email:
PHP Version: OS:


 [2017-12-23 13:17 UTC] dpa-bugs at aegee dot org
ext/openssl/config0.m4 contains:

  PHP_SETUP_OPENSSL(OPENSSL_SHARED_LIBADD, [AC_DEFINE(HAVE_OPENSSL_EXT,1,[ ])], [AC_MSG_ERROR([OpenSSL check failed. Please check config.log for more information.])])

meaning that ./configure first checks for RAND_egd and then adds -lcrypto to LDFLAGS.  This cannot work in this order, as RAND_egd can only be detected after -lcrypto is passed to the linker.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-02-27 17:11 UTC] dpa-bugs at aegee dot org
Proposed patch:

--- php-7.1.14/ext/openssl/config0.m4.old   2018-01-30 19:05:37.000000000 +0000
+++ php-7.1.14/ext/openssl/   2018-02-01 18:40:38.340000000 +0000
@@ -19,8 +19,6 @@
@@ -30,4 +28,6 @@
   if test "$PHP_SYSTEM_CIPHERS" != "no"; then
     AC_DEFINE(USE_OPENSSL_SYSTEM_CIPHERS,1,[ Use system default cipher list instead of hardcoded value ])
 [2020-10-14 14:21 UTC]
-Status: Open +Status: Verified
 [2020-10-14 14:21 UTC]
The check is certainly useless as-is. I was wondering why it exists at all, as the docs state:

> RAND_egd() is available since OpenSSL 0.9.5.

Turns out the check was added for LibreSSL compatibility:

Which also makes me wonder if we shouldn't just drop the RAND_egd() call entirely, it seems like some rather dubious functionality.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Jul 28 18:01:25 2021 UTC