diff --git a/patches/0002-Add-crypto-backend-foundation.patch b/patches/0002-Add-crypto-backend-foundation.patch index 6ba293fd76..87de796c19 100644 --- a/patches/0002-Add-crypto-backend-foundation.patch +++ b/patches/0002-Add-crypto-backend-foundation.patch @@ -54,10 +54,12 @@ Subject: [PATCH] Add crypto backend foundation src/crypto/tls/prf_test.go | 12 +- src/crypto/x509/boring_test.go | 5 + src/go/build/deps_test.go | 4 + - src/hash/marshal_test.go | 3 + + src/hash/boring_test.go | 5 + + src/hash/marshal_test.go | 5 + + src/hash/notboring_test.go | 5 + src/net/smtp/smtp_test.go | 72 ++++--- src/runtime/runtime_boring.go | 5 + - 53 files changed, 861 insertions(+), 106 deletions(-) + 55 files changed, 873 insertions(+), 106 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 @@ -67,6 +69,8 @@ Subject: [PATCH] Add crypto backend foundation create mode 100644 src/crypto/internal/backend/nobackend.go create mode 100644 src/crypto/internal/backend/norequirefips.go create mode 100644 src/crypto/internal/backend/stub.s + create mode 100644 src/hash/boring_test.go + create mode 100644 src/hash/notboring_test.go diff --git a/src/crypto/aes/cipher.go b/src/crypto/aes/cipher.go index cde2e45d2ca559..cf47a4fc57d8e2 100644 @@ -1909,20 +1913,44 @@ index c6a2518f62ff3a..578b4d6f68504c 100644 < crypto/rand < crypto/internal/mlkem768 < crypto/ed25519 +diff --git a/src/hash/boring_test.go b/src/hash/boring_test.go +new file mode 100644 +index 00000000000000..cd07ee1c00d379 +--- /dev/null ++++ b/src/hash/boring_test.go +@@ -0,0 +1,5 @@ ++//go:build systemcrypto ++ ++package hash_test ++ ++const boringEnabled = true diff --git a/src/hash/marshal_test.go b/src/hash/marshal_test.go -index 3091f7a67acede..b066f8281c5265 100644 +index 3091f7a67acede..fead8cc4bec73a 100644 --- a/src/hash/marshal_test.go +++ b/src/hash/marshal_test.go -@@ -65,6 +65,9 @@ func TestMarshalHash(t *testing.T) { +@@ -65,6 +65,11 @@ func TestMarshalHash(t *testing.T) { } h := tt.new() -+ if _, ok := h.(encoding.BinaryMarshaler); !ok { -+ t.Skip("BinaryMarshaler not implemented") ++ if boringEnabled { ++ if _, ok := h.(encoding.BinaryMarshaler); !ok { ++ t.Skip("BinaryMarshaler not implemented") ++ } + } h.Write(buf[:256]) sum := h.Sum(nil) +diff --git a/src/hash/notboring_test.go b/src/hash/notboring_test.go +new file mode 100644 +index 00000000000000..e1874086d3f315 +--- /dev/null ++++ b/src/hash/notboring_test.go +@@ -0,0 +1,5 @@ ++//go:build !systemcrypto ++ ++package hash_test ++ ++const boringEnabled = false diff --git a/src/net/smtp/smtp_test.go b/src/net/smtp/smtp_test.go index 389eda9ad54b99..110d60beb0e70c 100644 --- a/src/net/smtp/smtp_test.go