Skip to content

Commit 2d29904

Browse files
committed
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.
1 parent f799f42 commit 2d29904

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

ext/curl/config.m4

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ if test "$PHP_CURL" != "no"; then
2323
esac
2424

2525
if test "$CURL_SSL" = yes; then
26-
AC_DEFINE([HAVE_CURL_SSL], [1], [Have cURL with SSL support])
27-
2826
save_CFLAGS="$CFLAGS"
2927
CFLAGS="$CFLAGS $CURL_CFLAGS"
3028
save_LDFLAGS="$LDFLAGS"

ext/curl/config.w32

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ if (PHP_CURL != "no") {
2828
) {
2929
EXTENSION("curl", "interface.c multi.c share.c curl_file.c");
3030
AC_DEFINE('HAVE_CURL', 1, 'Have cURL library');
31-
AC_DEFINE('HAVE_CURL_SSL', 1, 'Have SSL suppurt in cURL');
3231
ADD_FLAG("CFLAGS_CURL", "/D CURL_STATICLIB");
3332
// TODO: check for curl_version_info
3433
} else {

ext/curl/interface.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,17 @@
4343
#endif
4444

4545
/* {{{ cruft for thread safe SSL crypto locks */
46-
#if defined(ZTS) && defined(HAVE_CURL_SSL)
47-
# ifdef PHP_WIN32
46+
#if defined(ZTS) && defined(HAVE_CURL_OPENSSL)
47+
# if defined(HAVE_OPENSSL_CRYPTO_H)
4848
# define PHP_CURL_NEED_OPENSSL_TSL
4949
# include <openssl/crypto.h>
50-
# elif defined(HAVE_CURL_OPENSSL)
51-
# if defined(HAVE_OPENSSL_CRYPTO_H)
52-
# define PHP_CURL_NEED_OPENSSL_TSL
53-
# include <openssl/crypto.h>
54-
# else
55-
# warning \
50+
# else
51+
# warning \
5652
"libcurl was compiled with OpenSSL support, but configure could not find " \
5753
"openssl/crypto.h; thus no SSL crypto locking callbacks will be set, which may " \
5854
"cause random crashes on SSL requests"
59-
# endif
60-
# endif /* HAVE_CURL_OPENSSL */
61-
#endif /* ZTS && HAVE_CURL_SSL */
55+
# endif
56+
#endif /* ZTS && HAVE_CURL_OPENSSL */
6257
/* }}} */
6358

6459
#define SMART_STR_PREALLOC 4096

0 commit comments

Comments
 (0)