From 9412bb427aefa1b5d38ae607e5ae1c0ef849d5c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draic=20Brady?= Date: Sun, 23 Feb 2014 13:12:44 +0000 Subject: [PATCH] Add CN_match and SNI_server_name setup to RemoteFilesystem --- src/Composer/Util/RemoteFilesystem.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index e084999a8..d266d08d7 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -357,6 +357,11 @@ class RemoteFilesystem $options['http']['header'][] = $header; } + // Setup remaining TLS options - the matching may need monitoring, esp. www vs none in CN + $host = parse_url($originUrl, PHP_URL_HOST); + $this->options['ssl']['CN_match'] = $host; + $this->options['ssl']['SNI_server_name'] = $host; + /** * Setup TLS options CN_match and SNI_server_name based on URL given */