Skip to content

Commit

Permalink
Require at least OpenSSL version 0.9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
bukka committed Sep 20, 2015
1 parent 76783a2 commit 6a81363
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ PHP NEWS
. Fixed bug #70481 (Memory leak in auto_global_copy_ctor() in ZTS build).
(Laruence)

- OpenSSL
. Require at least OpenSSL version 0.9.8. (Jakub Zelenka)

- Session:
. Fixed bug #70529 (Session read causes "String is not zero-terminated" error).
(Yasuo)
Expand Down
10 changes: 5 additions & 5 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2334,13 +2334,13 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
dnl If pkg-config is found try using it
if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
if $PKG_CONFIG --atleast-version=0.9.8 openssl; then
found_openssl=yes
OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
else
AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
AC_MSG_ERROR([OpenSSL version 0.9.8 or greater required.])
fi
if test -n "$OPENSSL_LIBS"; then
Expand Down Expand Up @@ -2381,13 +2381,13 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
AC_MSG_CHECKING([for OpenSSL version])
AC_EGREP_CPP(yes,[
#include <openssl/opensslv.h>
#if OPENSSL_VERSION_NUMBER >= 0x0090600fL
#if OPENSSL_VERSION_NUMBER >= 0x0090800fL
yes
#endif
],[
AC_MSG_RESULT([>= 0.9.6])
AC_MSG_RESULT([>= 0.9.8])
],[
AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
AC_MSG_ERROR([OpenSSL version 0.9.8 or greater required.])
])
CPPFLAGS=$old_CPPFLAGS
Expand Down
4 changes: 1 addition & 3 deletions ext/openssl/config0.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dnl $Id$
dnl

PHP_ARG_WITH(openssl, for OpenSSL support,
[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.6)])
[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.8)])

PHP_ARG_WITH(kerberos, for Kerberos support,
[ --with-kerberos[=DIR] OPENSSL: Include Kerberos support], no, no)
Expand All @@ -19,8 +19,6 @@ if test "$PHP_OPENSSL" != "no"; then
PHP_SETUP_KERBEROS(OPENSSL_SHARED_LIBADD)
fi

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,
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3420,7 +3420,7 @@ static EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req
}
}
break;
#if !defined(NO_DSA) && defined(HAVE_DSA_DEFAULT_METHOD)
#if !defined(NO_DSA)
case OPENSSL_KEYTYPE_DSA:
{
DSA *dsaparam = NULL;
Expand Down

0 comments on commit 6a81363

Please sign in to comment.