소스 검색

Add CN_match and SNI_server_name setup to RemoteFilesystem

Pádraic Brady 11 년 전
부모
커밋
9412bb427a
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/Composer/Util/RemoteFilesystem.php

+ 5 - 0
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
          */