X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fhttp%2FPhpHttpRequest.php;h=0f499c23021256e624f45747b042d614589ffa2a;hp=0c5d1623452e7a61bf6964a7bc2e2279c70aee7d;hb=aec80a1fb774715e43430ab583c190b79e468fce;hpb=0be80f9680ae5acba1931f18fdecd0e3c634d6a6 diff --git a/includes/http/PhpHttpRequest.php b/includes/http/PhpHttpRequest.php index 0c5d162345..0f499c2302 100644 --- a/includes/http/PhpHttpRequest.php +++ b/includes/http/PhpHttpRequest.php @@ -46,23 +46,6 @@ class PhpHttpRequest extends MWHttpRequest { $certLocations = []; if ( $this->caInfo ) { $certLocations = [ 'manual' => $this->caInfo ]; - } elseif ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) { - // @codingStandardsIgnoreStart Generic.Files.LineLength - // Default locations, based on - // https://www.happyassassin.net/2015/01/12/a-note-about-ssltls-trusted-certificate-stores-and-platforms/ - // PHP 5.5 and older doesn't have any defaults, so we try to guess ourselves. - // PHP 5.6+ gets the CA location from OpenSSL as long as it is not set manually, - // so we should leave capath/cafile empty there. - // @codingStandardsIgnoreEnd - $certLocations = array_filter( [ - getenv( 'SSL_CERT_DIR' ), - getenv( 'SSL_CERT_PATH' ), - '/etc/pki/tls/certs/ca-bundle.crt', # Fedora et al - '/etc/ssl/certs', # Debian et al - '/etc/pki/tls/certs/ca-bundle.trust.crt', - '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem', - '/System/Library/OpenSSL', # OSX - ] ); } foreach ( $certLocations as $key => $cert ) {