Skip to content

Commit

Permalink
Rollup merge of rust-lang#55840 - dlrobertson:fix_stage0_download, r=…
Browse files Browse the repository at this point in the history
…alexcrichton

Fix TLS errors when downloading stage0

While attempting to test rust-lang#49878 on Windows I hit the following error when attempting to download stage0.

```
The request was aborted: Could not create SSL/TLS secure channel
```

Instead of using the shell, we can just use `urllib`, which seems to fix the issue.
  • Loading branch information
pietroalbini authored Nov 12, 2018
2 parents 68afefc + c211238 commit ff06c9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def _download(path, url, probably_big, verbose, exception):
# see http://serverfault.com/questions/301128/how-to-download
if sys.platform == 'win32':
run(["PowerShell.exe", "/nologo", "-Command",
"(New-Object System.Net.WebClient)"
".DownloadFile('{}', '{}')".format(url, path)],
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;",
"(New-Object System.Net.WebClient).DownloadFile('{}', '{}')".format(url, path)],
verbose=verbose,
exception=exception)
else:
Expand Down

0 comments on commit ff06c9d

Please sign in to comment.