Skip to content

Commit

Permalink
Fix patch conflicts (adjacent lines)
Browse files Browse the repository at this point in the history
  • Loading branch information
dagood committed Dec 14, 2023
1 parent fde002b commit 7063a2b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
34 changes: 17 additions & 17 deletions patches/0004-Add-OpenSSL-crypto-backend.patch
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ index f0e3575637c62a..0e9aceeb832d3b 100644
package main

diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index 9635c4fb616ecf..ba12fbee276416 100644
index 5e62bbf4c22c66..7fd1dfcb8e9592 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -1211,12 +1211,11 @@ func (t *tester) registerCgoTests(heading string) {
@@ -1222,12 +1222,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 Down Expand Up @@ -107,10 +107,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 a6f7173706f5f9..fecbab119f716a 100644
index eab74dc32864ed..d9a41aa26d8908 100644
--- a/src/cmd/link/internal/ld/lib.go
+++ b/src/cmd/link/internal/ld/lib.go
@@ -1152,6 +1152,7 @@ var hostobj []Hostobj
@@ -1162,6 +1162,7 @@ var hostobj []Hostobj
// These packages can use internal linking mode.
// Others trigger external mode.
var internalpkg = []string{
Expand Down Expand Up @@ -706,32 +706,32 @@ index c83a7272c9f01f..a0548a7f9179c5 100644
package x509

diff --git a/src/go.mod b/src/go.mod
index 003d6a96a90ccf..f377301bbc1ba1 100644
index c18ae7760f61c5..a0f4b8bb8cae1d 100644
--- a/src/go.mod
+++ b/src/go.mod
@@ -3,6 +3,7 @@ module std
go 1.22

require (
+ github.com/golang-fips/openssl/v2 v2.0.0-rc.3.0.20231108174110-41b6eb24da28
golang.org/x/crypto v0.14.1-0.20231011220222-8779cbd1c995
golang.org/x/net v0.17.1-0.20231025180729-4c7a5b64f145
golang.org/x/crypto v0.16.1-0.20231129163542-152cdb1503eb
golang.org/x/net v0.19.0
)
diff --git a/src/go.sum b/src/go.sum
index 22519d7febbfbc..312db048ffdf24 100644
index 7c3519882a5b78..59d9f4cf7444e1 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.20231108174110-41b6eb24da28 h1:tFlW5hU9m5kkVIShxa1FFNLe9gwoygZFHw/d/60VE7s=
+github.com/golang-fips/openssl/v2 v2.0.0-rc.3.0.20231108174110-41b6eb24da28/go.mod h1:7tuBqX2Zov8Yq5mJ2yzlKhpnxOnWyEzi38AzeWRuQdg=
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.20231025180729-4c7a5b64f145 h1:b50rfQxeg+jm4ud87SAQt4escws56zdE+/rT1oKU4oU=
golang.org/x/crypto v0.16.1-0.20231129163542-152cdb1503eb h1:1ceSY7sk6sJuiDREHpfyrqDnDljsLfEP2GuTClhBBfI=
golang.org/x/crypto v0.16.1-0.20231129163542-152cdb1503eb/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go
index f9d8437263358d..092da8a6f012cc 100644
index 3dd2595b34b07b..f126cad1f5c460 100644
--- a/src/go/build/deps_test.go
+++ b/src/go/build/deps_test.go
@@ -429,6 +429,8 @@ var depsRules = `
@@ -438,6 +438,8 @@ var depsRules = `

crypto/cipher,
crypto/internal/boring/bcache
Expand All @@ -740,15 +740,15 @@ index f9d8437263358d..092da8a6f012cc 100644
< crypto/internal/boring
< crypto/internal/backend
< crypto/boring;
@@ -463,6 +465,7 @@ var depsRules = `
@@ -472,6 +474,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
@@ -714,7 +717,7 @@ var buildIgnore = []byte("\n//go:build ignore")
@@ -757,7 +760,7 @@ var buildIgnore = []byte("\n//go:build ignore")

func findImports(pkg string) ([]string, error) {
vpkg := pkg
Expand All @@ -757,7 +757,7 @@ index f9d8437263358d..092da8a6f012cc 100644
vpkg = "vendor/" + pkg
}
dir := filepath.Join(Default.GOROOT, "src", vpkg)
@@ -724,7 +727,7 @@ func findImports(pkg string) ([]string, error) {
@@ -767,7 +770,7 @@ func findImports(pkg string) ([]string, error) {
}
var imports []string
var haveImport = map[string]bool{}
Expand Down Expand Up @@ -797,7 +797,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 950cc6e899a982..73384bdb63e44a 100644
index 2f423aefd14076..e58baf9fa0ef4e 100644
--- a/src/internal/goexperiment/flags.go
+++ b/src/internal/goexperiment/flags.go
@@ -59,6 +59,7 @@ type Flags struct {
Expand Down
26 changes: 13 additions & 13 deletions patches/0005-Add-CNG-crypto-backend.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ index 9c1d3d279c472f..0ca7a863b73690 100644
package fipsonly

diff --git a/src/crypto/tls/handshake_server_tls13.go b/src/crypto/tls/handshake_server_tls13.go
index 07b1a3851e0714..6fae2b4ba22540 100644
index 21d798de37db0a..6c65da0ab04f9f 100644
--- a/src/crypto/tls/handshake_server_tls13.go
+++ b/src/crypto/tls/handshake_server_tls13.go
@@ -13,6 +13,7 @@ import (
Expand All @@ -1018,7 +1018,7 @@ index 07b1a3851e0714..6fae2b4ba22540 100644
"io"
"time"
)
@@ -402,6 +403,15 @@ func cloneHash(in hash.Hash, h crypto.Hash) hash.Hash {
@@ -409,6 +410,15 @@ func cloneHash(in hash.Hash, h crypto.Hash) hash.Hash {
}
marshaler, ok := in.(binaryMarshaler)
if !ok {
Expand Down Expand Up @@ -1087,34 +1087,34 @@ index a0548a7f9179c5..ae6117a1554b7f 100644
package x509

diff --git a/src/go.mod b/src/go.mod
index f377301bbc1ba1..1c951bd1fab8eb 100644
index a0f4b8bb8cae1d..5745a76af48510 100644
--- a/src/go.mod
+++ b/src/go.mod
@@ -4,6 +4,7 @@ go 1.22

require (
github.com/golang-fips/openssl/v2 v2.0.0-rc.3.0.20231108174110-41b6eb24da28
+ github.com/microsoft/go-crypto-winnative v0.0.0-20231013074141-ebaf9de20b54
golang.org/x/crypto v0.14.1-0.20231011220222-8779cbd1c995
golang.org/x/net v0.17.1-0.20231025180729-4c7a5b64f145
golang.org/x/crypto v0.16.1-0.20231129163542-152cdb1503eb
golang.org/x/net v0.19.0
)
diff --git a/src/go.sum b/src/go.sum
index 312db048ffdf24..e5547fad2fda7a 100644
index 59d9f4cf7444e1..f246dcd8986c0b 100644
--- a/src/go.sum
+++ b/src/go.sum
@@ -1,5 +1,7 @@
github.com/golang-fips/openssl/v2 v2.0.0-rc.3.0.20231108174110-41b6eb24da28 h1:tFlW5hU9m5kkVIShxa1FFNLe9gwoygZFHw/d/60VE7s=
github.com/golang-fips/openssl/v2 v2.0.0-rc.3.0.20231108174110-41b6eb24da28/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.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.20231025180729-4c7a5b64f145 h1:b50rfQxeg+jm4ud87SAQt4escws56zdE+/rT1oKU4oU=
golang.org/x/crypto v0.16.1-0.20231129163542-152cdb1503eb h1:1ceSY7sk6sJuiDREHpfyrqDnDljsLfEP2GuTClhBBfI=
golang.org/x/crypto v0.16.1-0.20231129163542-152cdb1503eb/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go
index 092da8a6f012cc..7fb557bdf226d4 100644
index f126cad1f5c460..c437493faaaad1 100644
--- a/src/go/build/deps_test.go
+++ b/src/go/build/deps_test.go
@@ -429,6 +429,10 @@ var depsRules = `
@@ -438,6 +438,10 @@ var depsRules = `

crypto/cipher,
crypto/internal/boring/bcache
Expand All @@ -1125,7 +1125,7 @@ index 092da8a6f012cc..7fb557bdf226d4 100644
< github.com/golang-fips/openssl/v2/internal/subtle
< github.com/golang-fips/openssl/v2
< crypto/internal/boring
@@ -465,6 +469,7 @@ var depsRules = `
@@ -474,6 +478,7 @@ var depsRules = `

# CRYPTO-MATH is core bignum-based crypto - no cgo, net; fmt now ok.
CRYPTO, FMT, math/big
Expand Down Expand Up @@ -1199,7 +1199,7 @@ index 00000000000000..99ee2542ca38a9
+const CNGCrypto = true
+const CNGCryptoInt = 1
diff --git a/src/internal/goexperiment/flags.go b/src/internal/goexperiment/flags.go
index 73384bdb63e44a..65b637f84dbf00 100644
index e58baf9fa0ef4e..eb7871b0769055 100644
--- a/src/internal/goexperiment/flags.go
+++ b/src/internal/goexperiment/flags.go
@@ -60,6 +60,7 @@ type Flags struct {
Expand Down
4 changes: 2 additions & 2 deletions patches/0006-Vendor-crypto-backends.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9220,7 +9220,7 @@ index 00000000000000..1722410e5af193
+ return getSystemDirectory() + "\\" + dll
+}
diff --git a/src/vendor/modules.txt b/src/vendor/modules.txt
index 6d611897961b1e..23405114a0490e 100644
index 338c496bf95ad7..e24146c6f0dab3 100644
--- a/src/vendor/modules.txt
+++ b/src/vendor/modules.txt
@@ -1,3 +1,14 @@
Expand All @@ -9235,6 +9235,6 @@ index 6d611897961b1e..23405114a0490e 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.1-0.20231011220222-8779cbd1c995
# golang.org/x/crypto v0.16.1-0.20231129163542-152cdb1503eb
## explicit; go 1.18
golang.org/x/crypto/chacha20

0 comments on commit 7063a2b

Please sign in to comment.