summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-01-06 10:16:42 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-01-06 10:17:37 +0100
commit2d29904f252c7e7bb7c7cdfe9b6f095e3fb8f5d9 (patch)
tree3f49b9d1545716cb99b42c7eab0628463c8b98b4
parentf799f42ec818659a2434dc0f7281ce755592391a (diff)
downloadphp-git-2d29904f252c7e7bb7c7cdfe9b6f095e3fb8f5d9.tar.gz
Clean up curl openssl check
Only set HAVE_CURL_OPENSSL flag, and remove Windows specific code, as all of this is only relevant for OpenSSL < 1.1, which is not used on Windows.
-rw-r--r--ext/curl/config.m42
-rw-r--r--ext/curl/config.w321
-rw-r--r--ext/curl/interface.c17
3 files changed, 6 insertions, 14 deletions
diff --git a/ext/curl/config.m4 b/ext/curl/config.m4
index 6e8d36b8a2..4879cd3da2 100644
--- a/ext/curl/config.m4
+++ b/ext/curl/config.m4
@@ -23,8 +23,6 @@ if test "$PHP_CURL" != "no"; then
esac
if test "$CURL_SSL" = yes; then
- AC_DEFINE([HAVE_CURL_SSL], [1], [Have cURL with SSL support])
-
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CURL_CFLAGS"
save_LDFLAGS="$LDFLAGS"
diff --git a/ext/curl/config.w32 b/ext/curl/config.w32
index 515747f893..8ff6718b60 100644
--- a/ext/curl/config.w32
+++ b/ext/curl/config.w32
@@ -28,7 +28,6 @@ if (PHP_CURL != "no") {
) {
EXTENSION("curl", "interface.c multi.c share.c curl_file.c");
AC_DEFINE('HAVE_CURL', 1, 'Have cURL library');
- AC_DEFINE('HAVE_CURL_SSL', 1, 'Have SSL suppurt in cURL');
ADD_FLAG("CFLAGS_CURL", "/D CURL_STATICLIB");
// TODO: check for curl_version_info
} else {
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 39d74b27d1..4e17e29159 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -43,22 +43,17 @@
#endif
/* {{{ cruft for thread safe SSL crypto locks */
-#if defined(ZTS) && defined(HAVE_CURL_SSL)
-# ifdef PHP_WIN32
+#if defined(ZTS) && defined(HAVE_CURL_OPENSSL)
+# if defined(HAVE_OPENSSL_CRYPTO_H)
# define PHP_CURL_NEED_OPENSSL_TSL
# include <openssl/crypto.h>
-# elif defined(HAVE_CURL_OPENSSL)
-# if defined(HAVE_OPENSSL_CRYPTO_H)
-# define PHP_CURL_NEED_OPENSSL_TSL
-# include <openssl/crypto.h>
-# else
-# warning \
+# else
+# warning \
"libcurl was compiled with OpenSSL support, but configure could not find " \
"openssl/crypto.h; thus no SSL crypto locking callbacks will be set, which may " \
"cause random crashes on SSL requests"
-# endif
-# endif /* HAVE_CURL_OPENSSL */
-#endif /* ZTS && HAVE_CURL_SSL */
+# endif
+#endif /* ZTS && HAVE_CURL_OPENSSL */
/* }}} */
#define SMART_STR_PREALLOC 4096