Browse code

Force Download-File function to use TLS 1.2

Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>

Olli Janatuinen authored on 2020/09/20 20:37:56
Showing 1 changed files
... ...
@@ -205,6 +205,7 @@ RUN `
205 205
       Throw ("Failed to download " + $source) `
206 206
       }`
207 207
     } else { `
208
+      [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
208 209
       $webClient = New-Object System.Net.WebClient; `
209 210
       $webClient.DownloadFile($source, $target); `
210 211
     } `