Skip to content

Commit

Permalink
Enable TLS 1.2 in core.ps1 (ScoopInstaller#2074)
Browse files Browse the repository at this point in the history
Enable TLS 1.2 in core.ps1
  • Loading branch information
masaeedu authored and r15ch13 committed Mar 2, 2018
1 parent ac27bdf commit 039f28b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/core.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ $globaldir = $env:SCOOP_GLOBAL, "$env:ProgramData\scoop" | select -first 1
# Use at your own risk.
$cachedir = $env:SCOOP_CACHE, "$scoopdir\cache" | select -first 1

# Note: Github disabled TLS 1.0 support on 2018-02-23. Need to enable TLS 1.2
# for all communication with api.github.com
function enable-encryptionscheme($scheme) {
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor $scheme
}
enable-encryptionscheme "Tls12"

# helper functions
function coalesce($a, $b) { if($a) { return $a } $b }

Expand Down

0 comments on commit 039f28b

Please sign in to comment.