|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
5 + 7 = ?
Subscribe to this entry?

 [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-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 13:01:29 2024 UTC