File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,21 @@ if (!(Test-Path $BinDir)) {
31
31
New-Item $BinDir - ItemType Directory | Out-Null
32
32
}
33
33
34
+ # Ignore SSL certificate errors
35
+ # https://stackoverflow.com/questions/11696944/powershell-v3-invoke-webrequest-https-error
36
+ add-type @"
37
+ using System.Net;
38
+ using System.Security.Cryptography.X509Certificates;
39
+ public class TrustAllCertsPolicy : ICertificatePolicy {
40
+ public bool CheckValidationResult(
41
+ ServicePoint srvPoint, X509Certificate certificate,
42
+ WebRequest request, int certificateProblem) {
43
+ return true;
44
+ }
45
+ }
46
+ "@
47
+ [System.Net.ServicePointManager ]::CertificatePolicy = New-Object TrustAllCertsPolicy
48
+
34
49
Invoke-WebRequest $DvmUri - OutFile $DvmZip - UseBasicParsing
35
50
36
51
if (Get-Command Expand-Archive - ErrorAction SilentlyContinue) {
Original file line number Diff line number Diff line change 34
34
35
35
if [ " $1 " = " " ]; then
36
36
cd " $dvm_bin_dir "
37
- curl --fail --location --progress-bar --output " $exe .zip" " $dvm_uri "
37
+ curl --fail --location --progress-bar -k - -output " $exe .zip" " $dvm_uri "
38
38
unzip -o " $exe .zip"
39
39
rm " $exe .zip"
40
40
else
You can’t perform that action at this time.
0 commit comments