StefanScherer / packer-windows

Windows Templates for Packer: Windows 11, Windows 10, Windows Server 2022, 2019, 2016, also with Docker
MIT License
1.29k stars 434 forks source link

Force the use of TLS1.2 when downloading 7zip #303

Closed Conky5 closed 3 years ago

Conky5 commented 3 years ago

The 7zip download appears to require TLS1.2 now. The powershell script has this configuration, also add it to the batch script.

gitmesome commented 3 years ago

I second this. I had to do the same thing.

Additionally, I had to do the following

diff --git a/scripts/docker/install-docker.ps1 b/scripts/docker/install-docker.ps1
index 5e92ad2..602f8eb 100644
--- a/scripts/docker/install-docker.ps1
+++ b/scripts/docker/install-docker.ps1
@@ -34,7 +34,7 @@ if ($zip_url) {
 else {
   Write-Output "Use get.mirantis.com/install.ps1 ..."
   Invoke-WebRequest https://get.mirantis.com/install.ps1 -OutFile $env:TEMP\install.ps1 -UseBasicParsing
-  .\$env:TEMP\install.ps1
+  &$env:TEMP\install.ps1
   Remove-Item $env:TEMP\install.ps1 -Force -ErrorAction SilentlyContinue
 }