Skip to content

Commit

Permalink
env/darwin,env/windows: add platform testing root
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
rolandshoemaker committed Jun 30, 2023
1 parent 230a785 commit ac62432
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions env/darwin/setup-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,12 @@ https://developer.apple.com/support/xcode/ is a more authoritative list of versi
- install the command line tools: `sudo xcode-select --install`
- run xcode-select: `sudo xcode-select --switch /Library/Developer/CommandLineTools`



Install crypto/x509 test root:
```
curl -f -o /tmp/test_root.pem "https://storage.googleapis.com/go-builder-data/platform_root_cert.pem"
security add-trusted-cert -d -r trustRoot -p ssl -k /Library/Keychains/System.keychain /tmp/test_root.pem
```

Put a builder key in the usual spot.
8 changes: 8 additions & 0 deletions env/windows-arm64/azure/startup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ Get-FileFromUrl -URL "https://aka.ms/vs/16/release/vs_buildtools.exe" -Output "$
Write-Host "installing Visual Studio Build Tools"
& $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

# Download and install the root certificate used for crypto/x509 testing
Write-Host "downloading crypto/x509 test root"
$test_root = "$builder_dir\test_root.pem"
Get-FileFromUrl -URL "https://storage.googleapis.com/go-builder-data/platform_root_cert.pem" -Output "$test_root"

Write-Host "installing crypto/x509 test root"
Import-Certificate -FilePath "$test_root" -CertStoreLocation "Cert:\LocalMachine\Root"

# Create a buildlet user
Write-Host "creating buildlet user"
$buildlet_user = "gopher"
Expand Down
8 changes: 8 additions & 0 deletions env/windows/startup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ Get-FileFromUrl -URL "https://storage.googleapis.com/go-builder-data/vs_buildtoo
Write-Host "installing Visual Studio Build Tools"
& $vs_buildtools --quiet --wait --norestart --nocache --installPath "$dep_dir\vs" --all

# Download and install the root certificate used for crypto/x509 testing
Write-Host "downloading crypto/x509 test root"
$test_root = "$builder_dir\test_root.pem"
Get-FileFromUrl -URL "https://storage.googleapis.com/go-builder-data/platform_root_cert.pem" -Output "$test_root"

Write-Host "installing crypto/x509 test root"
Import-Certificate -FilePath "$test_root" -CertStoreLocation "Cert:\LocalMachine\Root"

# Create a buildlet user
Write-Host "creating buildlet user"
$buildlet_user = "gopher"
Expand Down

0 comments on commit ac62432

Please sign in to comment.