aboutsummaryrefslogtreecommitdiff
path: root/dev/deps.py
diff options
context:
space:
mode:
authorwbond <will@wbond.net>2017-05-09 10:34:32 -0400
committerwbond <will@wbond.net>2017-05-09 10:34:32 -0400
commite054cdeca56d6e5aaccc33dbeb87469281030b43 (patch)
treebc2f686b3795e5d6ffb53249c4cd93446f500377 /dev/deps.py
parent7c960bc748f40028e0850f737a0199314e0da8a0 (diff)
downloadasn1crypto-e054cdeca56d6e5aaccc33dbeb87469281030b43.tar.gz
Require WebClient uses TLS 1.2 to connect to curl.haxx.se
Diffstat (limited to 'dev/deps.py')
-rw-r--r--dev/deps.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/dev/deps.py b/dev/deps.py
index 72c6149..36370f0 100644
--- a/dev/deps.py
+++ b/dev/deps.py
@@ -81,7 +81,8 @@ def _download(url, dest):
if sys.platform == 'win32':
system_root = os.environ.get('SystemRoot')
powershell_exe = os.path.join('system32\\WindowsPowerShell\\v1.0\\powershell.exe')
- code = "(New-Object Net.WebClient).DownloadFile('%s', '%s');" % (url, dest_path)
+ code = "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;"
+ code += " (New-Object Net.WebClient).DownloadFile('%s', '%s');" % (url, dest_path)
_execute([powershell_exe, '-Command', code], dest)
else: