|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71483 RAND_egd() check always fails
Submitted: 2016-01-29 13:07 UTC Modified: 2017-01-11 08:00 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: jeff at macloue dot com Assigned:
Status: Wont fix Package: *Compile Issues
PHP Version: 5.6.17 OS: Linux
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: jeff at macloue dot com
New email:
PHP Version: OS:


 [2016-01-29 13:07 UTC] jeff at macloue dot com
In ./ext/openssl/config0.m4 the check for RAND_egd() function is placed before OpenSSL compile flags are applied. This makes this test fail and RAND_egd() function not used even if it is present.

$ nm -D /usr/lib64/ | grep RAND_egd
00000000000e4340 T RAND_egd
00000000000e4320 T RAND_egd_bytes

$ ./configure --with-openssl
$ grep HAVE_RAND_EGD ./main/php_config.h
/* #undef HAVE_RAND_EGD */

A workaround is adding -lcrypto to LDFLAGS:

$ ./configure --with-openssl LDFLAGS=-lcrypto
$ grep HAVE_RAND_EGD ./main/php_config.h
#define HAVE_RAND_EGD 1

A possible solution is moving AC_CHECK_FUNCS() call below PHP_SETUP_OPENSSL() (attached)


php-openssl-rand-egd.patch (last revision 2016-01-29 13:07 UTC by jeff at macloue dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-11 08:00 UTC]
-Status: Open +Status: Wont fix
 [2017-01-11 08:00 UTC]
Since this patch targets a security fix only branch (and this is only a bug), and since supported branches are not effected by this issue, I'm closing this report.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Oct 18 19:03:35 2021 UTC