Skip to content

Commit ac62432

Browse files
env/darwin,env/windows: add platform testing root
Adds notes to env/darwin/setup-notes.md on how to install the crypto/x509 testing root, and adds a stanza to env/windows/startup.ps1 to do the same thing. This change assumes that the platform root has been added to the go-builder-data GCS bucket. Updates golang/go#52108 Change-Id: Ieb4d6461c4ee96ddc6c00c18213e5447ba9ab273 Reviewed-on: https://go-review.googlesource.com/c/build/+/503836 TryBot-Bypass: Dmitri Shuralyov <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
1 parent 230a785 commit ac62432

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

env/darwin/setup-notes.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,12 @@ https://developer.apple.com/support/xcode/ is a more authoritative list of versi
103103
- install the command line tools: `sudo xcode-select --install`
104104
- run xcode-select: `sudo xcode-select --switch /Library/Developer/CommandLineTools`
105105

106+
107+
108+
Install crypto/x509 test root:
109+
```
110+
curl -f -o /tmp/test_root.pem "https://storage.googleapis.com/go-builder-data/platform_root_cert.pem"
111+
security add-trusted-cert -d -r trustRoot -p ssl -k /Library/Keychains/System.keychain /tmp/test_root.pem
112+
```
113+
106114
Put a builder key in the usual spot.

env/windows-arm64/azure/startup.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,14 @@ Get-FileFromUrl -URL "https://aka.ms/vs/16/release/vs_buildtools.exe" -Output "$
142142
Write-Host "installing Visual Studio Build Tools"
143143
& $vs_buildtools --quiet --wait --norestart --nocache --installPath "$dep_dir\vs" --all --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.VC.Tools.ARM
144144

145+
# Download and install the root certificate used for crypto/x509 testing
146+
Write-Host "downloading crypto/x509 test root"
147+
$test_root = "$builder_dir\test_root.pem"
148+
Get-FileFromUrl -URL "https://storage.googleapis.com/go-builder-data/platform_root_cert.pem" -Output "$test_root"
149+
150+
Write-Host "installing crypto/x509 test root"
151+
Import-Certificate -FilePath "$test_root" -CertStoreLocation "Cert:\LocalMachine\Root"
152+
145153
# Create a buildlet user
146154
Write-Host "creating buildlet user"
147155
$buildlet_user = "gopher"

env/windows/startup.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ Get-FileFromUrl -URL "https://storage.googleapis.com/go-builder-data/vs_buildtoo
153153
Write-Host "installing Visual Studio Build Tools"
154154
& $vs_buildtools --quiet --wait --norestart --nocache --installPath "$dep_dir\vs" --all
155155

156+
# Download and install the root certificate used for crypto/x509 testing
157+
Write-Host "downloading crypto/x509 test root"
158+
$test_root = "$builder_dir\test_root.pem"
159+
Get-FileFromUrl -URL "https://storage.googleapis.com/go-builder-data/platform_root_cert.pem" -Output "$test_root"
160+
161+
Write-Host "installing crypto/x509 test root"
162+
Import-Certificate -FilePath "$test_root" -CertStoreLocation "Cert:\LocalMachine\Root"
163+
156164
# Create a buildlet user
157165
Write-Host "creating buildlet user"
158166
$buildlet_user = "gopher"

0 commit comments

Comments
 (0)