From e7a9bd336229122792cbbd3fd078b8af174611de Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 7 Aug 2018 08:11:10 +0200 Subject: [PATCH] Attempt workaround for repo.packagist.org domain SSL on very old PHP, fixes #7530 --- src/Composer/Util/RemoteFilesystem.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index dc570ecf3..ee18ad62d 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -761,6 +761,9 @@ class RemoteFilesystem $tlsOptions['ssl']['CN_match'] = $certMap['cn']; $tlsOptions['ssl']['peer_fingerprint'] = $certMap['fp']; + } elseif (!CaBundle::isOpensslParseSafe() && $host === 'repo.packagist.org') { + // handle subjectAltName for packagist.org's repo domain on very old PHPs + $tlsOptions['ssl']['CN_match'] = 'packagist.org'; } }