@@ -9,6 +9,7 @@ Use a 'go' that was recently built by the current branch to ensure stable result
9
9
src/crypto/internal/backend/deps_ignore.go | 19 +
10
10
src/go.mod | 5 +
11
11
src/go.sum | 4 +
12
+ src/go/build/deps_test.go | 14 +-
12
13
src/go/build/vendor_test.go | 2 +
13
14
.../golang-fips/openssl/v2/.gitignore | 1 +
14
15
.../golang-fips/openssl/v2/.gitleaks.toml | 9 +
@@ -74,7 +75,7 @@ Use a 'go' that was recently built by the current branch to ensure stable result
74
75
.../internal/subtle/aliasing.go | 32 +
75
76
.../internal/sysdll/sys_windows.go | 55 ++
76
77
src/vendor/modules.txt | 11 +
77
- 68 files changed, 11005 insertions(+)
78
+ 69 files changed, 11016 insertions(+), 3 deletions(- )
78
79
create mode 100644 src/crypto/internal/backend/deps_ignore.go
79
80
create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/.gitignore
80
81
create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/.gitleaks.toml
@@ -142,7 +143,7 @@ Use a 'go' that was recently built by the current branch to ensure stable result
142
143
143
144
diff --git a/src/crypto/internal/backend/deps_ignore.go b/src/crypto/internal/backend/deps_ignore.go
144
145
new file mode 100644
145
- index 00000000000000..979ee34f54acba
146
+ index 00000000000000..ba6d196a54f69d
146
147
--- /dev/null
147
148
+++ b/src/crypto/internal/backend/deps_ignore.go
148
149
@@ -0,0 +1,19 @@
@@ -152,7 +153,7 @@ index 00000000000000..979ee34f54acba
152
153
+
153
154
+ //go:build ms_ignore_backend_deps
154
155
+
155
- + package backend
156
+ + package main
156
157
+
157
158
+ import (
158
159
+ _ "github.com/golang-fips/openssl/v2"
@@ -190,6 +191,59 @@ index 9e661352f16e0b..abebb59dcd7739 100644
190
191
golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY=
191
192
golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
192
193
golang.org/x/net v0.32.1-0.20241206180132-552d8ac903a1 h1:+Yk1FZ5E+/ewA0nOO/HRYs9E4yeqpGOShuSAdzCNNoQ=
194
+ diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go
195
+ index e3e01077c18b17..5551a24f8a844e 100644
196
+ --- a/src/go/build/deps_test.go
197
+ +++ b/src/go/build/deps_test.go
198
+ @@ -503,7 +503,7 @@ var depsRules = `
199
+ NONE < crypto/internal/boring/sig, crypto/internal/boring/syso;
200
+ sync/atomic < crypto/internal/boring/bcache;
201
+
202
+ - FIPS, internal/godebug, hash, embed,
203
+ + FIPS, internal/godebug, hash, embed, encoding/binary,
204
+ crypto/internal/boring/sig,
205
+ crypto/internal/boring/syso,
206
+ crypto/internal/boring/bcache
207
+ @@ -513,6 +513,12 @@ var depsRules = `
208
+ < crypto/sha3
209
+ < crypto/internal/fips140hash
210
+ < crypto/cipher
211
+ + < github.com/golang-fips/openssl/v2/internal/subtle
212
+ + < github.com/golang-fips/openssl/v2
213
+ + < github.com/microsoft/go-crypto-winnative/internal/subtle
214
+ + < github.com/microsoft/go-crypto-winnative/internal/sysdll
215
+ + < github.com/microsoft/go-crypto-winnative/internal/bcrypt
216
+ + < github.com/microsoft/go-crypto-winnative/cng
217
+ < crypto/internal/boring
218
+ < crypto/boring
219
+ < crypto/aes,
220
+ @@ -534,6 +540,8 @@ var depsRules = `
221
+ # CRYPTO-MATH is crypto that exposes math/big APIs - no cgo, net; fmt now ok.
222
+
223
+ CRYPTO, FMT, math/big
224
+ + < github.com/golang-fips/openssl/v2/bbig
225
+ + < github.com/microsoft/go-crypto-winnative/cng/bbig
226
+ < crypto/internal/boring/bbig
227
+ < crypto/rand
228
+ < crypto/ed25519 # depends on crypto/rand.Reader
229
+ @@ -837,7 +845,7 @@ var buildIgnore = []byte("\n//go:build ignore")
230
+
231
+ func findImports(pkg string) ([]string, error) {
232
+ vpkg := pkg
233
+ - if strings.HasPrefix(pkg, "golang.org") {
234
+ + if strings.HasPrefix(pkg, "golang.org") || strings.HasPrefix(pkg, "github.com") {
235
+ vpkg = "vendor/" + pkg
236
+ }
237
+ dir := filepath.Join(Default.GOROOT, "src", vpkg)
238
+ @@ -847,7 +855,7 @@ func findImports(pkg string) ([]string, error) {
239
+ }
240
+ var imports []string
241
+ var haveImport = map[string]bool{}
242
+ - if pkg == "crypto/internal/boring" {
243
+ + if pkg == "crypto/internal/boring" || pkg == "github.com/golang-fips/openssl/v2" {
244
+ haveImport["C"] = true // kludge: prevent C from appearing in crypto/internal/boring imports
245
+ }
246
+ fset := token.NewFileSet()
193
247
diff --git a/src/go/build/vendor_test.go b/src/go/build/vendor_test.go
194
248
index 7f6237ffd59c11..1d0b9b20e9b1d4 100644
195
249
--- a/src/go/build/vendor_test.go
0 commit comments