Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update submodule to latest master in microsoft/main #1356

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go
Submodule go updated 135 files
32 changes: 23 additions & 9 deletions patches/0002-Add-crypto-backend-foundation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ Subject: [PATCH] Add crypto backend foundation
src/crypto/md5/md5.go | 7 +
src/crypto/md5/md5_test.go | 4 +
src/crypto/purego_test.go | 2 +-
src/crypto/rand/rand_unix.go | 2 +-
src/crypto/rand/rand.go | 2 +-
src/crypto/rand/rand_test.go | 2 +-
src/crypto/rc4/rc4.go | 18 ++
src/crypto/rsa/boring.go | 4 +-
src/crypto/rsa/notboring.go | 2 +-
Expand All @@ -55,7 +56,7 @@ Subject: [PATCH] Add crypto backend foundation
src/go/build/deps_test.go | 4 +
src/net/smtp/smtp_test.go | 72 ++++---
src/runtime/runtime_boring.go | 5 +
51 files changed, 790 insertions(+), 104 deletions(-)
52 files changed, 791 insertions(+), 105 deletions(-)
create mode 100644 src/crypto/ed25519/boring.go
create mode 100644 src/crypto/ed25519/notboring.go
create mode 100644 src/crypto/internal/backend/backend_test.go
Expand Down Expand Up @@ -931,19 +932,32 @@ index 62be347e0c6822..d284b5cf7814a6 100644
continue
}

diff --git a/src/crypto/rand/rand_unix.go b/src/crypto/rand/rand_unix.go
index 40fce36314adfa..1d6231ae91d5ae 100644
--- a/src/crypto/rand/rand_unix.go
+++ b/src/crypto/rand/rand_unix.go
@@ -10,7 +10,7 @@
diff --git a/src/crypto/rand/rand.go b/src/crypto/rand/rand.go
index 7c18d595c2eeaa..6750262c4241e5 100644
--- a/src/crypto/rand/rand.go
+++ b/src/crypto/rand/rand.go
@@ -7,7 +7,7 @@
package rand

import (
- "crypto/internal/boring"
+ boring "crypto/internal/backend"
"errors"
"internal/godebug"
"io"
"os"
diff --git a/src/crypto/rand/rand_test.go b/src/crypto/rand/rand_test.go
index 2372413279dafe..55e68ed21ca68e 100644
--- a/src/crypto/rand/rand_test.go
+++ b/src/crypto/rand/rand_test.go
@@ -7,7 +7,7 @@ package rand
import (
"bytes"
"compress/flate"
- "crypto/internal/boring"
+ boring "crypto/internal/backend"
"errors"
"internal/race"
"internal/testenv"
diff --git a/src/crypto/rc4/rc4.go b/src/crypto/rc4/rc4.go
index 67452ec39f0fd4..47726d0ebe38d9 100644
--- a/src/crypto/rc4/rc4.go
Expand Down Expand Up @@ -1720,7 +1734,7 @@ index 319ac61f49c994..1b2454dbaab264 100644
t.Helper()
k, err := rsa.GenerateKey(rand.Reader, size)
diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go
index e233535f752dfc..6b023f055b24ea 100644
index 3adc26ae2b6e29..f05cec9d7c3253 100644
--- a/src/go/build/deps_test.go
+++ b/src/go/build/deps_test.go
@@ -447,7 +447,9 @@ var depsRules = `
Expand Down
28 changes: 2 additions & 26 deletions patches/0005-Add-CNG-crypto-backend.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Subject: [PATCH] Add CNG crypto backend
src/crypto/internal/boring/fipstls/stub.s | 2 +-
src/crypto/internal/boring/fipstls/tls.go | 2 +-
src/crypto/md5/md5_test.go | 7 +
src/crypto/rand/rand_windows.go | 9 +-
src/crypto/rsa/boring.go | 2 +-
src/crypto/rsa/boring_test.go | 2 +-
src/crypto/rsa/notboring.go | 2 +-
Expand Down Expand Up @@ -48,7 +47,7 @@ Subject: [PATCH] Add CNG crypto backend
.../goexperiment/exp_cngcrypto_off.go | 9 +
src/internal/goexperiment/exp_cngcrypto_on.go | 9 +
src/internal/goexperiment/flags.go | 1 +
44 files changed, 452 insertions(+), 33 deletions(-)
43 files changed, 444 insertions(+), 32 deletions(-)
create mode 100644 src/crypto/ecdsa/badlinkname.go
create mode 100644 src/crypto/internal/backend/bbig/big_cng.go
create mode 100644 src/crypto/internal/backend/cng_windows.go
Expand Down Expand Up @@ -576,29 +575,6 @@ index 3a973eebd284a4..5e24e07e2787e2 100644
for i, test := range largeUnmarshalTests {

h := New()
diff --git a/src/crypto/rand/rand_windows.go b/src/crypto/rand/rand_windows.go
index 7380f1f0f1e6e6..35318d8fa67336 100644
--- a/src/crypto/rand/rand_windows.go
+++ b/src/crypto/rand/rand_windows.go
@@ -8,10 +8,17 @@
package rand

import (
+ boring "crypto/internal/backend"
"internal/syscall/windows"
)

-func init() { Reader = &rngReader{} }
+func init() {
+ if boring.Enabled {
+ Reader = boring.RandReader
+ return
+ }
+ Reader = &rngReader{}
+}

type rngReader struct{}

diff --git a/src/crypto/rsa/boring.go b/src/crypto/rsa/boring.go
index 220f8c05c3d94b..dd20b4af2e0472 100644
--- a/src/crypto/rsa/boring.go
Expand Down Expand Up @@ -1034,7 +1010,7 @@ index 8ec2c59f2c63e5..87b5f8e316f388 100644
golang.org/x/crypto v0.25.1-0.20240722173533-bb80217080b0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
golang.org/x/net v0.27.1-0.20240722181819-765c7e89b3bd h1:pHzwejE8Zkb94bG4nA+fUeskKPFp1HPldrhv62dabro=
diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go
index 097bffd599bc96..af0d39d1a84f76 100644
index 03005f247513cf..c77db5a856b7f6 100644
--- a/src/go/build/deps_test.go
+++ b/src/go/build/deps_test.go
@@ -459,6 +459,10 @@ var depsRules = `
Expand Down