diff --git a/eng/pipeline/stages/run-stage.yml b/eng/pipeline/stages/run-stage.yml index 3417f81589e..6020df61672 100644 --- a/eng/pipeline/stages/run-stage.yml +++ b/eng/pipeline/stages/run-stage.yml @@ -198,10 +198,23 @@ stages: $env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\Git\usr\bin' } ) -join ';' + function RemovePathBinary($name) { + $src = (Get-Command $name -ErrorAction SilentlyContinue).Source + if ($src) { + Write-Host "Removing $src" + Remove-Item $src + } else { + Write-Host "Command not found: $name" + } + } + + Write-Host "Removing pkg-config to skip cmd/go TestScript/list_pkgconfig_error on Windows." + RemovePathBinary 'pkg-config' + Write-Host "Removing Chocolatey shim for SWIG to avoid running misc SWIG tests that would fail." # The Chocolatey shims are located in a single folder in PATH, so we can't change PATH to exclude it. # Upstream Windows builders don't have SWIG installed, so this makes coverage even. - Remove-Item (Get-Command swig).Source + RemovePathBinary 'swig' } eng/run.ps1 cmdscan -envprefix GO_CMDSCAN_RULE_ -- ` diff --git a/go b/go index 5873bd1d7e8..bc2124dab14 160000 --- a/go +++ b/go @@ -1 +1 @@ -Subproject commit 5873bd1d7e87e0686390d71a840a44e2e2c3e11d +Subproject commit bc2124dab14fa292e18df2937037d782f7868635 diff --git a/patches/0004-Add-OpenSSL-crypto-backend.patch b/patches/0004-Add-OpenSSL-crypto-backend.patch index 4d711b25bc7..4c21849b951 100644 --- a/patches/0004-Add-OpenSSL-crypto-backend.patch +++ b/patches/0004-Add-OpenSSL-crypto-backend.patch @@ -706,7 +706,7 @@ index c83a7272c9f01f..a0548a7f9179c5 100644 package x509 diff --git a/src/go.mod b/src/go.mod -index 8f7dd5c0b69932..d437d420a0ff10 100644 +index 7116fd3d724946..7543d20c516759 100644 --- a/src/go.mod +++ b/src/go.mod @@ -3,6 +3,7 @@ module std @@ -714,19 +714,19 @@ index 8f7dd5c0b69932..d437d420a0ff10 100644 require ( + github.com/golang-fips/openssl/v2 v2.0.0-rc.3.0.20231017103527-08f07a7a41c3 - golang.org/x/crypto v0.14.0 - golang.org/x/net v0.17.0 + golang.org/x/crypto v0.14.1-0.20231011220222-8779cbd1c995 + golang.org/x/net v0.17.1-0.20231011215812-d23d9bc54922 ) diff --git a/src/go.sum b/src/go.sum -index 22511da608a07b..a8a68395888272 100644 +index bcaeab575880dc..a2bd8ff5e7e285 100644 --- a/src/go.sum +++ b/src/go.sum @@ -1,3 +1,5 @@ +github.com/golang-fips/openssl/v2 v2.0.0-rc.3.0.20231017103527-08f07a7a41c3 h1:EUdE8vQSqj5vTtLHwomurgliWNAO5A7GpCfUa0S1AtU= +github.com/golang-fips/openssl/v2 v2.0.0-rc.3.0.20231017103527-08f07a7a41c3/go.mod h1:7tuBqX2Zov8Yq5mJ2yzlKhpnxOnWyEzi38AzeWRuQdg= - golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= - golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= - golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= + golang.org/x/crypto v0.14.1-0.20231011220222-8779cbd1c995 h1:fwu25/DhiXr/++jtzz2gHfC/FL/FimAGVxczaK4pjR8= + golang.org/x/crypto v0.14.1-0.20231011220222-8779cbd1c995/go.mod h1:aSyBXtGhRzSMdne9jbl3+PPMVS0IgOWF6Llc+HB5uUU= + golang.org/x/net v0.17.1-0.20231011215812-d23d9bc54922 h1:5dPkjItO/mhqL4dWOB/ERHdeNKAe0YXhUnCOLpn/nwI= diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go index f10ecff5168acc..79d02564926b37 100644 --- a/src/go/build/deps_test.go diff --git a/patches/0005-Add-CNG-crypto-backend.patch b/patches/0005-Add-CNG-crypto-backend.patch index a0b561980dd..a8a356658b1 100644 --- a/patches/0005-Add-CNG-crypto-backend.patch +++ b/patches/0005-Add-CNG-crypto-backend.patch @@ -555,7 +555,7 @@ index f9d1037c9b82b9..6b91d4388b73fe 100644 h := New() diff --git a/src/crypto/rand/rand_windows.go b/src/crypto/rand/rand_windows.go -index 6c0655c72b692a..755861fc5bc21d 100644 +index 7380f1f0f1e6e6..35318d8fa67336 100644 --- a/src/crypto/rand/rand_windows.go +++ b/src/crypto/rand/rand_windows.go @@ -8,10 +8,17 @@ @@ -617,7 +617,7 @@ index 933ac569e034a8..0f152b210fdd84 100644 package rsa diff --git a/src/crypto/rsa/pkcs1v15.go b/src/crypto/rsa/pkcs1v15.go -index 05357064930a92..19bea42f552cd2 100644 +index fc1cba42579f1e..7e59e4ef238781 100644 --- a/src/crypto/rsa/pkcs1v15.go +++ b/src/crypto/rsa/pkcs1v15.go @@ -94,7 +94,9 @@ func DecryptPKCS1v15(random io.Reader, priv *PrivateKey, ciphertext []byte) ([]b @@ -665,7 +665,7 @@ index 05357064930a92..19bea42f552cd2 100644 if err != nil { return err diff --git a/src/crypto/rsa/pss.go b/src/crypto/rsa/pss.go -index 1096f5fbbb8846..b731d9524661f6 100644 +index 27241df1867cb5..fbe07cfa6ad76b 100644 --- a/src/crypto/rsa/pss.go +++ b/src/crypto/rsa/pss.go @@ -214,7 +214,9 @@ func signPSSWithSalt(priv *PrivateKey, hash crypto.Hash, hashed, salt []byte) ([ @@ -715,7 +715,7 @@ index cf03e3cb7ed2cc..361eab5db6137d 100644 t.Fatal(err) } diff --git a/src/crypto/rsa/rsa.go b/src/crypto/rsa/rsa.go -index 7f44522c7fe8c0..5d9be4f3e56b85 100644 +index 90d05432ed102b..7183ae3360ecb8 100644 --- a/src/crypto/rsa/rsa.go +++ b/src/crypto/rsa/rsa.go @@ -35,6 +35,7 @@ import ( @@ -827,7 +827,7 @@ index bc169888786321..e0d6f4c5040d91 100644 h := New() diff --git a/src/crypto/sha256/sha256.go b/src/crypto/sha256/sha256.go -index b6fd0c3aab5100..fa246e9ecf65ba 100644 +index c352fc6351fbf7..a3906bff3e13fb 100644 --- a/src/crypto/sha256/sha256.go +++ b/src/crypto/sha256/sha256.go @@ -158,7 +158,7 @@ func New() hash.Hash { @@ -1087,7 +1087,7 @@ index a0548a7f9179c5..ae6117a1554b7f 100644 package x509 diff --git a/src/go.mod b/src/go.mod -index d437d420a0ff10..4bf3850e1ec873 100644 +index 7543d20c516759..20516381c7c818 100644 --- a/src/go.mod +++ b/src/go.mod @@ -4,6 +4,7 @@ go 1.22 @@ -1095,11 +1095,11 @@ index d437d420a0ff10..4bf3850e1ec873 100644 require ( github.com/golang-fips/openssl/v2 v2.0.0-rc.3.0.20231017103527-08f07a7a41c3 + github.com/microsoft/go-crypto-winnative v0.0.0-20231013074141-ebaf9de20b54 - golang.org/x/crypto v0.14.0 - golang.org/x/net v0.17.0 + golang.org/x/crypto v0.14.1-0.20231011220222-8779cbd1c995 + golang.org/x/net v0.17.1-0.20231011215812-d23d9bc54922 ) diff --git a/src/go.sum b/src/go.sum -index a8a68395888272..8bc402c806c35c 100644 +index a2bd8ff5e7e285..a6327968ba387c 100644 --- a/src/go.sum +++ b/src/go.sum @@ -1,5 +1,7 @@ @@ -1107,9 +1107,9 @@ index a8a68395888272..8bc402c806c35c 100644 github.com/golang-fips/openssl/v2 v2.0.0-rc.3.0.20231017103527-08f07a7a41c3/go.mod h1:7tuBqX2Zov8Yq5mJ2yzlKhpnxOnWyEzi38AzeWRuQdg= +github.com/microsoft/go-crypto-winnative v0.0.0-20231013074141-ebaf9de20b54 h1:TCT5sTFxoPwPQkdegvnmgmcZRpecDsrLSCyWYUwAWTs= +github.com/microsoft/go-crypto-winnative v0.0.0-20231013074141-ebaf9de20b54/go.mod h1:fveERXKbeK+XLmOyU24caKnIT/S5nniAX9XCRHfnrM4= - golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= - golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= - golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= + golang.org/x/crypto v0.14.1-0.20231011220222-8779cbd1c995 h1:fwu25/DhiXr/++jtzz2gHfC/FL/FimAGVxczaK4pjR8= + golang.org/x/crypto v0.14.1-0.20231011220222-8779cbd1c995/go.mod h1:aSyBXtGhRzSMdne9jbl3+PPMVS0IgOWF6Llc+HB5uUU= + golang.org/x/net v0.17.1-0.20231011215812-d23d9bc54922 h1:5dPkjItO/mhqL4dWOB/ERHdeNKAe0YXhUnCOLpn/nwI= diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go index 79d02564926b37..f66f834ca76528 100644 --- a/src/go/build/deps_test.go diff --git a/patches/0006-Vendor-crypto-backends.patch b/patches/0006-Vendor-crypto-backends.patch index 0cd8c71b04b..e6c2c8985ce 100644 --- a/patches/0006-Vendor-crypto-backends.patch +++ b/patches/0006-Vendor-crypto-backends.patch @@ -9213,7 +9213,7 @@ index 00000000000000..1722410e5af193 + return getSystemDirectory() + "\\" + dll +} diff --git a/src/vendor/modules.txt b/src/vendor/modules.txt -index bc4eb872eb8495..aa6be1b04abb53 100644 +index 5680dfb8c13ae4..75a0bd10fa757e 100644 --- a/src/vendor/modules.txt +++ b/src/vendor/modules.txt @@ -1,3 +1,14 @@ @@ -9228,6 +9228,6 @@ index bc4eb872eb8495..aa6be1b04abb53 100644 +github.com/microsoft/go-crypto-winnative/internal/bcrypt +github.com/microsoft/go-crypto-winnative/internal/subtle +github.com/microsoft/go-crypto-winnative/internal/sysdll - # golang.org/x/crypto v0.14.0 - ## explicit; go 1.17 + # golang.org/x/crypto v0.14.1-0.20231011220222-8779cbd1c995 + ## explicit; go 1.18 golang.org/x/crypto/chacha20