Fix windows examples CI by upgrading TLS trust store (#1171)

This commit is contained in:
Misha Zharov 2024-02-15 05:15:21 -05:00 committed by GitHub
parent 4831827e29
commit 25ed4c48ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -157,6 +157,8 @@ tasks:
- "-//cmake_hello_world_lib/static:libhello_example"
- "-//cmake_hello_world_lib/static:test_hello"
- "-//cmake_with_data/..."
batch_commands:
- powershell -noexit "& "".\..\.bazelci\windows-update-certs.ps1"""
build_targets: *windows_targets
test_targets: *windows_targets
build_flags:

View File

@ -0,0 +1,6 @@
cd $env:USERPROFILE;
Invoke-WebRequest https://curl.haxx.se/ca/cacert.pem -OutFile $env:USERPROFILE\cacert.pem;
$plaintext_pw = 'PASSWORD';
$secure_pw = ConvertTo-SecureString $plaintext_pw -AsPlainText -Force;
& openssl.exe pkcs12 -export -nokeys -out certs.pfx -in cacert.pem -passout pass:$plaintext_pw;
Import-PfxCertificate -Password $secure_pw -CertStoreLocation Cert:\LocalMachine\Root -FilePath certs.pfx;