summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeigh <leigh@php.net>2015-03-27 13:24:36 +0100
committerLeigh <leigh@php.net>2015-03-27 13:24:36 +0100
commit1b2d58a364b8ac5e135bec18f6b47902ec62c5db (patch)
tree5a16d8ab9335b05f6651a39975a79d070212d1f2
parentbc0e5051e3b6509027c621a11332cce60dde81cb (diff)
downloadphp-git-1b2d58a364b8ac5e135bec18f6b47902ec62c5db.tar.gz
Add RAND_egd check for compiling against LibreSSL
-rw-r--r--NEWS13
-rw-r--r--ext/openssl/config0.m41
-rw-r--r--ext/openssl/openssl.c2
3 files changed, 10 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index c97283808f..5cda6a2814 100644
--- a/NEWS
+++ b/NEWS
@@ -32,27 +32,28 @@ PHP NEWS
Welch)
- Mbstring:
- . Fixed bug #68846 (False detection of CJK Unified Ideographs Extension E).
+ . Fixed bug #68846 (False detection of CJK Unified Ideographs Extension E).
(Masaki Kagaya)
- OpenSSL:
- . Fixed bug #67403 (Add signatureType to openssl_x509_parse).
+ . Fixed bug #67403 (Add signatureType to openssl_x509_parse).
+ . Add a check for RAND_egd to allow compiling against LibreSSL (Leigh)
- Postgres:
. Fixed bug #68741 (Null pointer dereference) (CVE-2015-1352). (Laruence)
- SPL:
- . Fixed bug #69227 (Use after free in zval_scan caused by
+ . Fixed bug #69227 (Use after free in zval_scan caused by
spl_object_storage_get_gc). (adam dot scarr at 99designs dot com)
- SOAP:
- . Fixed bug #69293 (NEW segfault when using SoapClient::__setSoapHeader
+ . Fixed bug #69293 (NEW segfault when using SoapClient::__setSoapHeader
(bisected, regression)). (thomas at shadowweb dot org, Laruence)
- SQLITE:
- . Fixed bug #68760 (SQLITE segfaults if custom collator throws an exception).
+ . Fixed bug #68760 (SQLITE segfaults if custom collator throws an exception).
(Dan Ackroyd)
- . Fixed bug #69287 (Upgrade bundled sqlite to 3.8.8.3). (Anatol)
+ . Fixed bug #69287 (Upgrade bundled sqlite to 3.8.8.3). (Anatol)
19 Mar 2015, PHP 5.5.23
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) {