Skip to content

Commit 208b836

Browse files
committed
Drop support for OpenSSL < 1.1.0 on Windows
PR php#13498 bumped the required OpenSSL version to 1.1.1, but apparently only for non Windows system. We catch up somewhat by dropping support for OpenSSL < 1.1.0 on Windows; besides completely removing detection of old OpenSSL versions in `SETUP_OPENSSL`, we also ensure that all bundled extension using this function do no longer accept OpenSSL < 1.1.0, to avoid to still be able to build these extensions with older `phpize` scripts. We do not cater to `--phar-native-ssl` yet; that might better be addressed by php#14578.
1 parent e7c16d2 commit 208b836

File tree

6 files changed

+6
-12
lines changed

6 files changed

+6
-12
lines changed

ext/curl/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if (PHP_CURL != "no") {
1515

1616
if (CHECK_LIB("libcurl_a.lib;libcurl.lib", "curl", PHP_CURL) &&
1717
CHECK_HEADER_ADD_INCLUDE("curl/easy.h", "CFLAGS_CURL") &&
18-
SETUP_OPENSSL("curl", PHP_CURL) > 0 &&
18+
SETUP_OPENSSL("curl", PHP_CURL) >= 2 &&
1919
CHECK_LIB("winmm.lib", "curl", PHP_CURL) &&
2020
CHECK_LIB("wldap32.lib", "curl", PHP_CURL) &&
2121
(((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "curl", PHP_CURL))) ||

ext/ftp/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if (PHP_FTP != "no") {
88

99
var ret = SETUP_OPENSSL("ftp", PHP_FTP);
1010

11-
if (ret > 0) {
11+
if (ret >= 2) {
1212
MESSAGE("Enabling SSL support for ext\\ftp");
1313
AC_DEFINE('HAVE_FTP_SSL', 1, 'Have FTP over SSL support');
1414
}

ext/ldap/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if (PHP_LDAP != "no") {
66

77
if (CHECK_HEADER_ADD_INCLUDE("ldap.h", "CFLAGS_LDAP", PHP_PHP_BUILD + "\\include\\openldap;" + PHP_PHP_BUILD + "\\openldap\\include;" + PHP_LDAP) &&
88
CHECK_HEADER_ADD_INCLUDE("lber.h", "CFLAGS_LDAP", PHP_PHP_BUILD + "\\include\\openldap;" + PHP_PHP_BUILD + "\\openldap\\include;" + PHP_LDAP) &&
9-
SETUP_OPENSSL("ldap", PHP_LDAP) > 0 &&
9+
SETUP_OPENSSL("ldap", PHP_LDAP) >= 2 &&
1010
CHECK_LIB("oldap32_a.lib", "ldap", PHP_LDAP) &&
1111
CHECK_LIB("olber32_a.lib", "ldap", PHP_LDAP)&&
1212
CHECK_LIB("libsasl.lib", "ldap", PHP_LDAP)) {

ext/openssl/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG_WITH("openssl", "OpenSSL support", "no,shared");
55
if (PHP_OPENSSL != "no") {
66
var ret = SETUP_OPENSSL("openssl", PHP_OPENSSL);
77

8-
if (ret > 0) {
8+
if (ret >= 2) {
99
EXTENSION("openssl", "openssl.c xp_ssl.c");
1010
AC_DEFINE("HAVE_OPENSSL_EXT", 1, "Define to 1 if the openssl extension is available.");
1111
}

ext/snmp/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG_WITH("snmp", "SNMP support", "no");
44

55
if (PHP_SNMP != "no") {
66
if (CHECK_HEADER_ADD_INCLUDE("snmp.h", "CFLAGS_SNMP", PHP_PHP_BUILD + "\\include\\net-snmp;" + PHP_SNMP) &&
7-
SETUP_OPENSSL("snmp", PHP_SNMP) > 0) {
7+
SETUP_OPENSSL("snmp", PHP_SNMP) >= 2) {
88
if (CHECK_LIB("netsnmp.lib", "snmp", PHP_SNMP)) {
99
EXTENSION('snmp', 'snmp.c');
1010
AC_DEFINE('HAVE_SNMP', 1);

win32/build/confutils.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3664,14 +3664,8 @@ function SETUP_OPENSSL(target, path_to_check, common_name, use_env, add_dir_part
36643664
CHECK_LIB("libssl.lib", target, path_to_check) &&
36653665
CHECK_LIB("crypt32.lib", target, path_to_check, common_name) &&
36663666
CHECK_HEADER_ADD_INCLUDE("openssl/ssl.h", cflags_var, path_to_check, use_env, add_dir_part, add_to_flag_only)) {
3667-
/* Openssl 1.1.x */
3667+
/* Openssl 1.1.x or later */
36683668
return 2;
3669-
} else if (CHECK_LIB("ssleay32.lib", target, path_to_check, common_name) &&
3670-
CHECK_LIB("libeay32.lib", target, path_to_check, common_name) &&
3671-
CHECK_LIB("crypt32.lib", target, path_to_check, common_name) &&
3672-
CHECK_HEADER_ADD_INCLUDE("openssl/ssl.h", cflags_var, path_to_check, use_env, add_dir_part, add_to_flag_only)) {
3673-
/* Openssl 1.0.x and lower */
3674-
return 1;
36753669
}
36763670

36773671
return ret;

0 commit comments

Comments
 (0)