Просмотр исходного кода

Merge pull request #38 from gabriel-samfira/enable-tls1.2-in-download-file

Enable TLS1.2 in download_file
Nashwan Azhari 7 лет назад
Родитель
Сommit
9d11aa65f8
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      coriolis/wsman.py

+ 2 - 0
coriolis/wsman.py

@@ -95,6 +95,8 @@ class WSManConnection(object):
         # Nano Server does not have Invoke-WebRequest and additionally
         # this is also faster
         self.exec_ps_command(
+            "[Net.ServicePointManager]::SecurityProtocol = "
+            "[Net.SecurityProtocolType]::Tls12;"
             "if(!([System.Management.Automation.PSTypeName]'"
             "System.Net.Http.HttpClient').Type) {$assembly = "
             "[System.Reflection.Assembly]::LoadWithPartialName("