public static function can_use_tls12(array $curlinfo, $uname) {
        // 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;
        }

        $sslversion = explode('/', $curlinfo['ssl_version']);
        // NSS has a space in the version number 😦.
        $flavour = explode(' ', $sslversion[0])[0];
        $version = count($sslversion) == 2 ? $sslversion[1] : null;

        $minversion = self::get_min_ssl_lib_version_for_tls12($flavour);
        if (!$minversion) {
            return false;
        }

        // Special case (see $versionmatrix above).
        if ($flavour == 'WinSSL') {
            return $uname >= '6.1';
        }

        // Special case (see $versionmatrix above).
        if ($flavour == 'SecureTransport') {
            return $uname >= '10.8.0';
        }

        return $version >= $minversion;
    }