]> granicus.if.org Git - php/commitdiff
Clean up curl openssl check
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 6 Jan 2020 09:16:42 +0000 (10:16 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 6 Jan 2020 09:17:37 +0000 (10:17 +0100)
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.

ext/curl/config.m4
ext/curl/config.w32
ext/curl/interface.c

index 6e8d36b8a28cb38f19ebdf50de387db7c1102a28..4879cd3da23dd8cbf0a0515a5f4273423c8720ef 100644 (file)
@@ -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"
index 515747f893f4e9e4a1d748fc716659d066088f7e..8ff6718b606be41ca7a4a72bb6ea9b2b1b4db5f4 100644 (file)
@@ -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 {
index 39d74b27d16a0a145028cc9cd2e6603173ca2ad1..4e17e29159c26dad0fdd5f1792812bdd91e3d59b 100644 (file)
 #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