Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Nov 22, 2024
1 parent cf1fe9c commit 89c89e7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
24 changes: 12 additions & 12 deletions patches/0002-Add-crypto-backend-foundation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ index b3d0a7368f7fa0..c34b994a67a289 100644
"os"
"sync"
diff --git a/src/crypto/rand/rand_test.go b/src/crypto/rand/rand_test.go
index 63581b75fdbc7f..dd220c7c544f76 100644
index 5cf0ad8ec1fd5d..a6c1074a3b909e 100644
--- a/src/crypto/rand/rand_test.go
+++ b/src/crypto/rand/rand_test.go
@@ -7,7 +7,7 @@ package rand
Expand All @@ -1000,8 +1000,8 @@ index 63581b75fdbc7f..dd220c7c544f76 100644
- "crypto/internal/boring"
+ boring "crypto/internal/backend"
"errors"
"internal/race"
"internal/testenv"
"internal/asan"
"internal/msan"
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 @@ -1346,7 +1346,7 @@ index d03892c57d4e61..f848659c6e4aa3 100644

h := New()
diff --git a/src/crypto/sha256/sha256.go b/src/crypto/sha256/sha256.go
index d87c689c9001ad..7584c380af0cec 100644
index 3c3aba84c586ce..a2db0a88e715d2 100644
--- a/src/crypto/sha256/sha256.go
+++ b/src/crypto/sha256/sha256.go
@@ -8,7 +8,7 @@ package sha256
Expand All @@ -1355,10 +1355,10 @@ index d87c689c9001ad..7584c380af0cec 100644
"crypto"
- "crypto/internal/boring"
+ boring "crypto/internal/backend"
_ "crypto/internal/fips/check"
"crypto/internal/fips/sha256"
"hash"
)
@@ -43,7 +43,7 @@ func New() hash.Hash {
@@ -44,7 +44,7 @@ func New() hash.Hash {
// [encoding.BinaryUnmarshaler] to marshal and unmarshal the internal
// state of the hash.
func New224() hash.Hash {
Expand All @@ -1367,7 +1367,7 @@ index d87c689c9001ad..7584c380af0cec 100644
return boring.NewSHA224()
}
return sha256.New224()
@@ -63,7 +63,7 @@ func Sum256(data []byte) [Size]byte {
@@ -64,7 +64,7 @@ func Sum256(data []byte) [Size]byte {

// Sum224 returns the SHA224 checksum of the data.
func Sum224(data []byte) [Size224]byte {
Expand All @@ -1377,7 +1377,7 @@ index d87c689c9001ad..7584c380af0cec 100644
}
h := New224()
diff --git a/src/crypto/sha256/sha256_test.go b/src/crypto/sha256/sha256_test.go
index ffd16386515830..58632c01dc6a7f 100644
index 77617a41a2a1f3..8e4b13c59445b5 100644
--- a/src/crypto/sha256/sha256_test.go
+++ b/src/crypto/sha256/sha256_test.go
@@ -8,7 +8,7 @@ package sha256
Expand Down Expand Up @@ -1937,10 +1937,10 @@ 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 c6a2518f62ff3a..578b4d6f68504c 100644
index bb2bfba6e4f32a..74e4a5c3702065 100644
--- a/src/go/build/deps_test.go
+++ b/src/go/build/deps_test.go
@@ -464,7 +464,9 @@ var depsRules = `
@@ -469,7 +469,9 @@ var depsRules = `
# CRYPTO is core crypto algorithms - no cgo, fmt, net.
FIPS,
crypto/internal/boring/sig,
Expand All @@ -1950,15 +1950,15 @@ index c6a2518f62ff3a..578b4d6f68504c 100644
golang.org/x/sys/cpu,
hash, embed
< crypto
@@ -475,6 +477,7 @@ var depsRules = `
@@ -480,6 +482,7 @@ var depsRules = `
crypto/cipher,
crypto/internal/boring/bcache
< crypto/internal/boring
+ < crypto/internal/backend
< crypto/boring;

crypto/internal/alias, math/rand/v2
@@ -512,6 +515,7 @@ var depsRules = `
@@ -517,6 +520,7 @@ var depsRules = `
# CRYPTO-MATH is core bignum-based crypto - no cgo, net; fmt now ok.
CRYPTO, FMT, math/big
< crypto/internal/boring/bbig
Expand Down
30 changes: 15 additions & 15 deletions patches/0004-Add-OpenSSL-crypto-backend.patch
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ index f0e3575637c62a..0e9aceeb832d3b 100644
package main

diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index 0facfb579cb196..223472e20d24a5 100644
index 3d56f863ccea81..aba8829d25c98e 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -1225,12 +1225,11 @@ func (t *tester) registerCgoTests(heading string) {
@@ -1278,12 +1278,11 @@ func (t *tester) registerCgoTests(heading string) {
// a C linker warning on Linux.
// in function `bio_ip_and_port_to_socket_and_addr':
// warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
Expand All @@ -75,7 +75,7 @@ index 0facfb579cb196..223472e20d24a5 100644
}
-
// Static linking tests
if goos != "android" && p != "netbsd/arm" {
if goos != "android" && p != "netbsd/arm" && !t.msan && !t.asan {
// TODO(#56629): Why does this fail on netbsd-arm?
diff --git a/src/cmd/go/go_boring_test.go b/src/cmd/go/go_boring_test.go
index ed0fbf3d53d75b..5376227f74cfaa 100644
Expand Down Expand Up @@ -110,10 +110,10 @@ index 4aaf46b5d0f0dc..6fe798cf4a94e9 100644

go list -f '{{.Dir}}' vendor/golang.org/x/net/http2/hpack
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
index 0c37a1dc1f8c15..faf8a1874d5f28 100644
index 46585479dab0cc..179f43cfc441ca 100644
--- a/src/cmd/link/internal/ld/lib.go
+++ b/src/cmd/link/internal/ld/lib.go
@@ -1163,6 +1163,7 @@ var hostobj []Hostobj
@@ -1165,6 +1165,7 @@ var hostobj []Hostobj
// These packages can use internal linking mode.
// Others trigger external mode.
var internalpkg = []string{
Expand Down Expand Up @@ -586,10 +586,10 @@ index 34c22c8fbba7da..933ac569e034a8 100644
package rsa

diff --git a/src/crypto/rsa/rsa_test.go b/src/crypto/rsa/rsa_test.go
index 86466e67e87eeb..dbcc1bec58bd46 100644
index c6294694521c69..ab99b176ac9540 100644
--- a/src/crypto/rsa/rsa_test.go
+++ b/src/crypto/rsa/rsa_test.go
@@ -690,6 +690,9 @@ func TestDecryptOAEP(t *testing.T) {
@@ -700,6 +700,9 @@ func TestDecryptOAEP(t *testing.T) {
}

func Test2DecryptOAEP(t *testing.T) {
Expand Down Expand Up @@ -716,7 +716,7 @@ index c83a7272c9f01f..a0548a7f9179c5 100644
package x509

diff --git a/src/go.mod b/src/go.mod
index df27f25e789f05..12d8c8f4f97321 100644
index 7a7b99150fc297..ecc5a486a3a596 100644
--- a/src/go.mod
+++ b/src/go.mod
@@ -3,6 +3,7 @@ module std
Expand All @@ -728,7 +728,7 @@ index df27f25e789f05..12d8c8f4f97321 100644
golang.org/x/net v0.27.1-0.20240722181819-765c7e89b3bd
)
diff --git a/src/go.sum b/src/go.sum
index b4efd6d3c50c11..4c3ca847c21cd2 100644
index 26a27ac8099c78..05e98158dd65eb 100644
--- a/src/go.sum
+++ b/src/go.sum
@@ -1,3 +1,5 @@
Expand All @@ -738,10 +738,10 @@ index b4efd6d3c50c11..4c3ca847c21cd2 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 578b4d6f68504c..80a14d54739524 100644
index 74e4a5c3702065..3a2a62b88bcdac 100644
--- a/src/go/build/deps_test.go
+++ b/src/go/build/deps_test.go
@@ -476,6 +476,8 @@ var depsRules = `
@@ -481,6 +481,8 @@ var depsRules = `

crypto/cipher,
crypto/internal/boring/bcache
Expand All @@ -750,15 +750,15 @@ index 578b4d6f68504c..80a14d54739524 100644
< crypto/internal/boring
< crypto/internal/backend
< crypto/boring;
@@ -514,6 +516,7 @@ var depsRules = `
@@ -519,6 +521,7 @@ var depsRules = `

# CRYPTO-MATH is core bignum-based crypto - no cgo, net; fmt now ok.
CRYPTO, FMT, math/big
+ < github.com/golang-fips/openssl/v2/bbig
< crypto/internal/boring/bbig
< crypto/internal/backend/bbig
< crypto/rand
@@ -812,7 +815,7 @@ var buildIgnore = []byte("\n//go:build ignore")
@@ -817,7 +820,7 @@ var buildIgnore = []byte("\n//go:build ignore")

func findImports(pkg string) ([]string, error) {
vpkg := pkg
Expand All @@ -767,7 +767,7 @@ index 578b4d6f68504c..80a14d54739524 100644
vpkg = "vendor/" + pkg
}
dir := filepath.Join(Default.GOROOT, "src", vpkg)
@@ -822,7 +825,7 @@ func findImports(pkg string) ([]string, error) {
@@ -827,7 +830,7 @@ func findImports(pkg string) ([]string, error) {
}
var imports []string
var haveImport = map[string]bool{}
Expand Down Expand Up @@ -839,7 +839,7 @@ index 00000000000000..a7f2712e9e1464
+const OpenSSLCrypto = true
+const OpenSSLCryptoInt = 1
diff --git a/src/internal/goexperiment/flags.go b/src/internal/goexperiment/flags.go
index d7cf7655f3cea3..9c8b16735cd4f1 100644
index 5820de59f767e1..b2526ea0f4e052 100644
--- a/src/internal/goexperiment/flags.go
+++ b/src/internal/goexperiment/flags.go
@@ -59,6 +59,7 @@ type Flags struct {
Expand Down

0 comments on commit 89c89e7

Please sign in to comment.