Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
gdams committed Jan 15, 2025
1 parent 09ef208 commit 8bcce40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 31 deletions.
9 changes: 5 additions & 4 deletions patches/0002-Vendor-crypto-backends.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Use a 'go' that was recently built by the current branch to ensure stable result
src/go.mod | 6 +
src/go.sum | 6 +
src/go/build/deps_test.go | 17 +-
src/go/build/vendor_test.go | 2 +
src/go/build/vendor_test.go | 3 +
.../golang-fips/openssl/v2/.gitignore | 1 +
.../golang-fips/openssl/v2/.gitleaks.toml | 9 +
.../github.com/golang-fips/openssl/v2/LICENSE | 20 +
Expand Down Expand Up @@ -101,7 +101,7 @@ Use a 'go' that was recently built by the current branch to ensure stable result
.../internal/subtle/aliasing.go | 32 +
.../internal/sysdll/sys_windows.go | 55 ++
src/vendor/modules.txt | 16 +
95 files changed, 13706 insertions(+), 3 deletions(-)
95 files changed, 13707 insertions(+), 3 deletions(-)
create mode 100644 src/crypto/internal/backend/deps_ignore.go
create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/.gitignore
create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/.gitleaks.toml
Expand Down Expand Up @@ -303,15 +303,16 @@ index e3e01077c18b17..e017efb1562379 100644
}
fset := token.NewFileSet()
diff --git a/src/go/build/vendor_test.go b/src/go/build/vendor_test.go
index 7f6237ffd59c11..1d0b9b20e9b1d4 100644
index 7f6237ffd59c11..6092c93d4c5b26 100644
--- a/src/go/build/vendor_test.go
+++ b/src/go/build/vendor_test.go
@@ -22,6 +22,8 @@ var allowedPackagePrefixes = []string{
@@ -22,6 +22,9 @@ var allowedPackagePrefixes = []string{
"github.com/google/pprof",
"github.com/ianlancetaylor/demangle",
"rsc.io/markdown",
+ "github.com/golang-fips/openssl",
+ "github.com/microsoft/go-crypto-winnative",
+ "github.com/microsoft/go-crypto-darwin",
}

// Verify that the vendor directories contain only packages matching the list above.
Expand Down
28 changes: 1 addition & 27 deletions patches/0007-Add-Darwin-crypto-backend.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ Subject: [PATCH] Add Darwin crypto backend
.../internal/backend/bbig/big_darwin.go | 12 +
src/crypto/internal/backend/darwin_darwin.go | 359 ++++++++++++++++++
src/crypto/internal/backend/fips140/darwin.go | 11 +
src/crypto/rsa/boring.go | 1 -
src/crypto/rsa/darwin.go | 71 ++++
src/go/build/vendor_test.go | 1 +
src/net/lookup_test.go | 3 +
src/runtime/pprof/vminfo_darwin_test.go | 6 +
9 files changed, 465 insertions(+), 1 deletion(-)
7 files changed, 464 insertions(+)
create mode 100644 src/crypto/internal/backend/bbig/big_darwin.go
create mode 100644 src/crypto/internal/backend/darwin_darwin.go
create mode 100644 src/crypto/internal/backend/fips140/darwin.go
Expand Down Expand Up @@ -432,18 +430,6 @@ index 00000000000000..ef5af5d956163e
+func systemFIPSMode() bool {
+ return false
+}
diff --git a/src/crypto/rsa/boring.go b/src/crypto/rsa/boring.go
index b9f9d3154f2589..28d16a89f6a1cf 100644
--- a/src/crypto/rsa/boring.go
+++ b/src/crypto/rsa/boring.go
@@ -66,7 +66,6 @@ func boringPrivateKey(priv *PrivateKey) (*boring.PrivateKeyRSA, error) {
if b != nil && privateKeyEqual(&b.orig, priv) {
return b.key, nil
}
-
b = new(boringPriv)
b.orig = copyPrivateKey(priv)

diff --git a/src/crypto/rsa/darwin.go b/src/crypto/rsa/darwin.go
new file mode 100644
index 00000000000000..1b9c63523ee90e
Expand Down Expand Up @@ -521,18 +507,6 @@ index 00000000000000..1b9c63523ee90e
+ })
+ return builder.Bytes()
+}
diff --git a/src/go/build/vendor_test.go b/src/go/build/vendor_test.go
index 1d0b9b20e9b1d4..6092c93d4c5b26 100644
--- a/src/go/build/vendor_test.go
+++ b/src/go/build/vendor_test.go
@@ -24,6 +24,7 @@ var allowedPackagePrefixes = []string{
"rsc.io/markdown",
"github.com/golang-fips/openssl",
"github.com/microsoft/go-crypto-winnative",
+ "github.com/microsoft/go-crypto-darwin",
}

// Verify that the vendor directories contain only packages matching the list above.
diff --git a/src/net/lookup_test.go b/src/net/lookup_test.go
index 514cbd098ae772..8ec689416dde1d 100644
--- a/src/net/lookup_test.go
Expand Down

0 comments on commit 8bcce40

Please sign in to comment.