diff --git a/go b/go index 79e01ab7e6f..8b396126412 160000 --- a/go +++ b/go @@ -1 +1 @@ -Subproject commit 79e01ab7e6ffbc4c07515dcfef04d1f0a5ca533d +Subproject commit 8b3961264120d188c3c9739370826e346d8748c2 diff --git a/patches/0003-Add-crypto-backend-foundation.patch b/patches/0003-Add-crypto-backend-foundation.patch index e4838efcf58..bcad6b497b9 100644 --- a/patches/0003-Add-crypto-backend-foundation.patch +++ b/patches/0003-Add-crypto-backend-foundation.patch @@ -28,6 +28,7 @@ Subject: [PATCH] Add crypto backend foundation src/crypto/rsa/pkcs1v15.go | 2 +- src/crypto/rsa/pss.go | 2 +- src/crypto/rsa/rsa.go | 4 +- + src/crypto/rsa/rsa_test.go | 2 +- src/crypto/sha1/boring.go | 2 +- src/crypto/sha1/sha1_test.go | 2 +- src/crypto/sha256/sha256.go | 2 +- @@ -37,7 +38,7 @@ Subject: [PATCH] Add crypto backend foundation src/crypto/tls/cipher_suites.go | 2 +- src/go/build/deps_test.go | 2 + src/runtime/runtime_boring.go | 5 + - 33 files changed, 291 insertions(+), 28 deletions(-) + 34 files changed, 292 insertions(+), 29 deletions(-) create mode 100644 src/crypto/internal/backend/backend_test.go create mode 100644 src/crypto/internal/backend/bbig/big.go create mode 100644 src/crypto/internal/backend/common.go @@ -575,6 +576,19 @@ index 11f87e8e4973e3..512e4a4d6616e5 100644 "crypto/internal/randutil" "crypto/rand" "crypto/subtle" +diff --git a/src/crypto/rsa/rsa_test.go b/src/crypto/rsa/rsa_test.go +index 3278a7ff305766..95f4b8e98d2fb0 100644 +--- a/src/crypto/rsa/rsa_test.go ++++ b/src/crypto/rsa/rsa_test.go +@@ -8,7 +8,7 @@ import ( + "bufio" + "bytes" + "crypto" +- "crypto/internal/boring" ++ boring "crypto/internal/backend" + "crypto/rand" + . "crypto/rsa" + "crypto/sha1" diff --git a/src/crypto/sha1/boring.go b/src/crypto/sha1/boring.go index b5786d1bf4ea92..e82a21c44a57c8 100644 --- a/src/crypto/sha1/boring.go @@ -667,7 +681,7 @@ index 04e6dfe0189b47..68598961fda6e4 100644 "crypto/sha1" "crypto/sha256" diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go -index ff9877b6793e6e..a6bd4eeba92c05 100644 +index 36091d5a94c8bf..efa94c83eb2642 100644 --- a/src/go/build/deps_test.go +++ b/src/go/build/deps_test.go @@ -399,6 +399,7 @@ var depsRules = ` diff --git a/patches/0005-Add-OpenSSL-crypto-backend.patch b/patches/0005-Add-OpenSSL-crypto-backend.patch index 125606803e8..4ac9467ee27 100644 --- a/patches/0005-Add-OpenSSL-crypto-backend.patch +++ b/patches/0005-Add-OpenSSL-crypto-backend.patch @@ -635,8 +635,8 @@ index 19dd06fee37ae8..eccb90ae2d36ac 100644 require ( + github.com/microsoft/go-crypto-openssl v0.2.3 - golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a - golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 + golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4 + golang.org/x/net v0.7.0 ) diff --git a/src/go.sum b/src/go.sum index ef6748d5968c24..799a91a2af7f4d 100644 @@ -645,9 +645,9 @@ index ef6748d5968c24..799a91a2af7f4d 100644 @@ -1,3 +1,5 @@ +github.com/microsoft/go-crypto-openssl v0.2.3 h1:bbY1FjnyjNcxZydzBcWp3FDruolP66P1gUGDlN5WGug= +github.com/microsoft/go-crypto-openssl v0.2.3/go.mod h1:rC+rtBU3m60UCQifBmpWII0VETfu78w6YGZQvVc0rd4= - golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a h1:diz9pEYuTIuLMJLs3rGDkeaTsNyRs6duYdFyPAxzE/U= - golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= - golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 h1:Frnccbp+ok2GkUS2tC84yAq/U9Vg+0sIO7aRL3T4Xnc= + golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4 h1:8CmdfDrqo5/AGztF4Zk/aBNGTgL5dgcfPMmmvH1z8Lo= + golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= + golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go index a7041966cc851a..7b6ccd1f189f7f 100644 --- a/src/go/build/deps_test.go diff --git a/patches/0006-Add-CNG-crypto-backend.patch b/patches/0006-Add-CNG-crypto-backend.patch index 321f85eeb1d..a98e7a4e97c 100644 --- a/patches/0006-Add-CNG-crypto-backend.patch +++ b/patches/0006-Add-CNG-crypto-backend.patch @@ -695,22 +695,14 @@ diff --git a/src/crypto/rsa/rsa_test.go b/src/crypto/rsa/rsa_test.go index 379fb06526ccc7..d844cc4b8d749e 100644 --- a/src/crypto/rsa/rsa_test.go +++ b/src/crypto/rsa/rsa_test.go -@@ -8,6 +8,7 @@ import ( - "bufio" - "bytes" - "crypto" -+ boring "crypto/internal/backend" - "crypto/rand" - . "crypto/rsa" - "crypto/sha1" @@ -16,6 +17,7 @@ import ( "encoding/pem" "flag" "fmt" + "internal/goexperiment" + "internal/testenv" "math/big" "strings" - "testing" @@ -111,6 +113,9 @@ func testKeyBasics(t *testing.T, priv *PrivateKey) { if priv.D.Cmp(priv.N) > 0 { t.Errorf("private exponent too large") @@ -1064,8 +1056,8 @@ index eccb90ae2d36ac..7fd7320e0a0e91 100644 require ( github.com/microsoft/go-crypto-openssl v0.2.3 + github.com/microsoft/go-crypto-winnative v0.0.0-20230125071228-ef6c7cb780c6 - golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a - golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 + golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4 + golang.org/x/net v0.7.0 ) diff --git a/src/go.sum b/src/go.sum index 799a91a2af7f4d..ce5ddcdf80951f 100644 @@ -1076,9 +1068,9 @@ index 799a91a2af7f4d..ce5ddcdf80951f 100644 github.com/microsoft/go-crypto-openssl v0.2.3/go.mod h1:rC+rtBU3m60UCQifBmpWII0VETfu78w6YGZQvVc0rd4= +github.com/microsoft/go-crypto-winnative v0.0.0-20230125071228-ef6c7cb780c6 h1:6DT0+Xkuu2MOaGrK41ATNUB4AhqUVq1/wWcOsCTAkck= +github.com/microsoft/go-crypto-winnative v0.0.0-20230125071228-ef6c7cb780c6/go.mod h1:fveERXKbeK+XLmOyU24caKnIT/S5nniAX9XCRHfnrM4= - golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a h1:diz9pEYuTIuLMJLs3rGDkeaTsNyRs6duYdFyPAxzE/U= - golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= - golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 h1:Frnccbp+ok2GkUS2tC84yAq/U9Vg+0sIO7aRL3T4Xnc= + golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4 h1:8CmdfDrqo5/AGztF4Zk/aBNGTgL5dgcfPMmmvH1z8Lo= + golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= + golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go index 7b6ccd1f189f7f..f6796dbc1ff029 100644 --- a/src/go/build/deps_test.go diff --git a/patches/0007-Vendor-crypto-backends.patch b/patches/0007-Vendor-crypto-backends.patch index dc11be88273..329eef0dcaa 100644 --- a/patches/0007-Vendor-crypto-backends.patch +++ b/patches/0007-Vendor-crypto-backends.patch @@ -6213,6 +6213,6 @@ index 3e4bb5b90bc672..e9962f98172436 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.3.1-0.20221117191849-2c476679df9a + # golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4 ## explicit; go 1.17 golang.org/x/crypto/chacha20