mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-7.4'
* PHP-7.4: Don't link against openssl 1.1 in curl
This commit is contained in:
commit
0b4da7e6da
2 changed files with 15 additions and 5 deletions
|
@ -26,7 +26,7 @@ if test "$PHP_CURL" != "no"; then
|
|||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $CURL_LIBS"
|
||||
|
||||
AC_MSG_CHECKING([for openssl support in libcurl])
|
||||
AC_MSG_CHECKING([for libcurl linked against old openssl])
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <strings.h>
|
||||
#include <curl/curl.h>
|
||||
|
@ -39,13 +39,23 @@ int main(int argc, char *argv[])
|
|||
const char *ptr = data->ssl_version;
|
||||
|
||||
while(*ptr == ' ') ++ptr;
|
||||
return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1);
|
||||
if (strncasecmp(ptr, "OpenSSL/1.1", sizeof("OpenSSL/1.1")-1) == 0) {
|
||||
/* New OpenSSL version */
|
||||
return 3;
|
||||
}
|
||||
if (strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1) == 0) {
|
||||
/* Old OpenSSL version */
|
||||
return 0;
|
||||
}
|
||||
/* Different SSL library */
|
||||
return 2;
|
||||
}
|
||||
/* No SSL support */
|
||||
return 1;
|
||||
}
|
||||
]])],[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_CURL_OPENSSL], [1], [Have cURL with OpenSSL support])
|
||||
AC_DEFINE([HAVE_CURL_OLD_OPENSSL], [1], [Have cURL with old OpenSSL])
|
||||
PKG_CHECK_MODULES([OPENSSL], [openssl], [
|
||||
PHP_EVAL_LIBLINE($OPENSSL_LIBS, CURL_SHARED_LIBADD)
|
||||
PHP_EVAL_INCLINE($OPENSSL_CFLAGS)
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#endif
|
||||
|
||||
/* {{{ cruft for thread safe SSL crypto locks */
|
||||
#if defined(ZTS) && defined(HAVE_CURL_OPENSSL)
|
||||
#if defined(ZTS) && defined(HAVE_CURL_OLD_OPENSSL)
|
||||
# if defined(HAVE_OPENSSL_CRYPTO_H)
|
||||
# define PHP_CURL_NEED_OPENSSL_TSL
|
||||
# include <openssl/crypto.h>
|
||||
|
@ -51,7 +51,7 @@
|
|||
"openssl/crypto.h; thus no SSL crypto locking callbacks will be set, which may " \
|
||||
"cause random crashes on SSL requests"
|
||||
# endif
|
||||
#endif /* ZTS && HAVE_CURL_OPENSSL */
|
||||
#endif /* ZTS && HAVE_CURL_OLD_OPENSSL */
|
||||
/* }}} */
|
||||
|
||||
#define SMART_STR_PREALLOC 4096
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue