Bug 1324040 - mozboot: Download rustup without SNI. r?froydnj draft
authorRalph Giles <giles@mozilla.com>
Fri, 16 Dec 2016 10:21:35 -0800
changeset 450475 b590b8f938524e47ae1ef484f207f1727dfdbb8e
parent 450435 5a536a16e33798fe7b16de35c968d5bc0cbf8448
child 539761 3e889d3c59cf78e153142f5b544a4fb109e8cfe2
push id38866
push userbmo:giles@thaumas.net
push dateFri, 16 Dec 2016 18:25:21 +0000
reviewersfroydnj
bugs1324040
milestone53.0a1
Bug 1324040 - mozboot: Download rustup without SNI. r?froydnj It seems older Python (e.g. 2.7 from Ubuntu 14.04) doesn't support SNI, so we get a TLS error with the canonical https://static.rust-lang.org/ url even when using the `requests` module. Fall back to the no-CNAME host instead which is ugly but works. Thanks to Simon Sapin for the suggestion. MozReview-Commit-ID: I6V5ASijuKi
python/mozboot/mozboot/rust.py
--- a/python/mozboot/mozboot/rust.py
+++ b/python/mozboot/mozboot/rust.py
@@ -7,17 +7,19 @@ from __future__ import print_function
 
 import errno
 import os
 import stat
 import subprocess
 import sys
 
 # Base url for pulling the rustup installer.
-RUSTUP_URL_BASE = 'https://static.rust-lang.org/rustup'
+# Use the no-CNAME host for compatibilty with Python 2.7
+# which doesn't support SNI.
+RUSTUP_URL_BASE = 'https://static-rust-lang-org.s3.amazonaws.com/rustup'
 
 # Pull this to get the lastest stable version number.
 RUSTUP_MANIFEST = os.path.join(RUSTUP_URL_BASE, 'release-stable.toml')
 
 # We bake in a known version number so we can verify a checksum.
 RUSTUP_VERSION = '0.6.5'
 
 # SHA-256 checksums of the installers, per platform.