MDL-56917 core_upgrade: Do not use the raw version to check cURL caps.
Some Linux distros can backport features due to security issues while keeping the same (old) version. See e.g.: - RHEL 7, https://rhn.redhat.com/errata/RHSA-2015-2159.html - RHEL 6, https://rhn.redhat.com/errata/RHBA-2016-0842.html - Remi PHP 7.0.x, https://github.com/remicollet/remirepo/commit/87954ef9ca41
This commit is contained in:
@@ -86,7 +86,9 @@ final class util {
|
||||
* @return bool
|
||||
*/
|
||||
public static function can_use_tls12(array $curlinfo, $uname) {
|
||||
if ($curlinfo['version_number'] < 467456 || !defined('CURL_SSLVERSION_TLSv1_2')) {
|
||||
// Do not compare the cURL version, e.g. $curlinfo['version_number'], with v7.34.0 (467456):
|
||||
// some Linux distros backport security issues and keep lower version numbers.
|
||||
if (!defined('CURL_SSLVERSION_TLSv1_2')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user