summaryrefslogtreecommitdiff
path: root/ext/openssl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl')
-rw-r--r--ext/openssl/config0.m41
-rw-r--r--ext/openssl/openssl.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/ext/openssl/config0.m4 b/ext/openssl/config0.m4
index a97114f808..bd58be3a5b 100644
--- a/ext/openssl/config0.m4
+++ b/ext/openssl/config0.m4
@@ -18,6 +18,7 @@ if test "$PHP_OPENSSL" != "no"; then
AC_CHECK_LIB(ssl, DSA_get_default_method, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later]))
AC_CHECK_LIB(crypto, X509_free, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later]))
+ AC_CHECK_FUNCS([RAND_egd])
PHP_SETUP_OPENSSL(OPENSSL_SHARED_LIBADD,
[
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index c64f1e92a7..9c4131f608 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -927,11 +927,13 @@ static int php_openssl_load_rand_file(const char * file, int *egdsocket, int *se
if (file == NULL) {
file = RAND_file_name(buffer, sizeof(buffer));
+#ifdef HAVE_RAND_EGD
} else if (RAND_egd(file) > 0) {
/* if the given filename is an EGD socket, don't
* write anything back to it */
*egdsocket = 1;
return SUCCESS;
+#endif
}
if (file == NULL || !RAND_load_file(file, -1)) {
if (RAND_status() == 0) {