Bug #75725 [Ver->Csd]: ./configure: detecting RAND_egd

From: Date: Mon, 22 Nov 2021 13:23:42 +0000
Subject: Bug #75725 [Ver->Csd]: ./configure: detecting RAND_egd
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-237908@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75725&edit=1 ID: 75725 Updated by: git@php.net Reported by: dpa-bugs at aegee dot org Summary: ./configure: detecting RAND_egd -Status: Verified +Status: Closed Type: Bug Package: *Compile Issues PHP Version: 7.1.12 Block user comment: N Private report: N New Comment: Automatic comment on behalf of dilyanpalauzov (author) and cmb69 (committer) Revision: https://github.com/php/php-src/commit/60fe575ce3d5ad0647d3c12698d0d3fcb0cb8f7b Log: Fix #75725: ./configure: detecting RAND_egd Previous Comments: ------------------------------------------------------------------------ [2021-11-19 19:33:57] dpa-bugs at aegee dot org See also https://github.com/php/php-src/pull/7668 . ------------------------------------------------------------------------ [2020-10-14 14:21:01] nikic@php.net 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: https://github.com/php/php-src/commit/456f4a78d24a929f5b9d1c064cd9c2ee7a8aaf5a Which also makes me wonder if we shouldn't just drop the RAND_egd() call entirely, it seems like some rather dubious functionality. ------------------------------------------------------------------------ [2018-02-27 17:11:37] 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/config0.m4.new 2018-02-01 18:40:38.340000000 +0000 @@ -19,8 +19,6 @@ PHP_SETUP_KERBEROS(OPENSSL_SHARED_LIBADD) fi - AC_CHECK_FUNCS([RAND_egd]) - PHP_SETUP_OPENSSL(OPENSSL_SHARED_LIBADD, [ AC_DEFINE(HAVE_OPENSSL_EXT,1,[ ]) @@ -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 ]) fi + AC_CHECK_FUNCS([RAND_egd]) fi + ------------------------------------------------------------------------ [2017-12-23 13:17:59] dpa-bugs at aegee dot org Description: ------------ ext/openssl/config0.m4 contains: AC_CHECK_FUNCS([RAND_egd]) 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75725&edit=1

« previous php.bugs (#237908) next »