diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2015-03-27 15:21:52 +0100 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2015-03-27 15:21:52 +0100 |
commit | f678519a63ac55803601c851c570611ad4f0bd6e (patch) | |
tree | eb414b482447c47aa8f3f88502f0c004de23c9c6 | |
parent | dd601e661cce41bd1fc8842b9b568b5680bd0a41 (diff) | |
parent | 456f4a78d24a929f5b9d1c064cd9c2ee7a8aaf5a (diff) | |
download | php-git-f678519a63ac55803601c851c570611ad4f0bd6e.tar.gz |
Merge branch 'master' of https://git.php.net/push/php-src
-rw-r--r-- | ext/openssl/config0.m4 | 1 | ||||
-rw-r--r-- | ext/openssl/openssl.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/ext/openssl/config0.m4 b/ext/openssl/config0.m4 index 701e488385..a9484b4acc 100644 --- a/ext/openssl/config0.m4 +++ b/ext/openssl/config0.m4 @@ -21,6 +21,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 704f119e1d..0c20fa1e15 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -993,11 +993,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) { |