Skip to content

Commit

Permalink
Merge pull request #1285 from microsoft/dev/auto-sync/microsoft/main
Browse files Browse the repository at this point in the history
Update submodule to latest `master` in `microsoft/main`
  • Loading branch information
microsoft-golang-review-bot authored Sep 30, 2024
2 parents 61a3fc9 + 40b7084 commit 2005ada
Show file tree
Hide file tree
Showing 10 changed files with 143 additions and 458 deletions.
2 changes: 1 addition & 1 deletion go
Submodule go updated 1322 files
16 changes: 8 additions & 8 deletions patches/0002-Add-crypto-backend-foundation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,8 @@ index 843678702bf93f..28f4ae5621921d 100644
"hash"
"internal/byteorder"
@@ -99,6 +100,9 @@ func consumeUint32(b []byte) ([]byte, uint32) {
// implements [encoding.BinaryMarshaler] and [encoding.BinaryUnmarshaler] to
// marshal and unmarshal the internal state of the hash.
// [encoding.BinaryUnmarshaler] to marshal and unmarshal the internal
// state of the hash.
func New() hash.Hash {
+ if boring.Enabled && boring.SupportsHash(crypto.MD5) {
+ return boring.NewMD5()
Expand Down Expand Up @@ -1217,8 +1217,8 @@ index 68244fd63b0c1e..2297c2aa71c288 100644
"hash"
"internal/byteorder"
@@ -153,7 +153,7 @@ func New() hash.Hash {

// New224 returns a new hash.Hash computing the SHA224 checksum.
// [encoding.BinaryUnmarshaler] to marshal and unmarshal the internal
// state of the hash.
func New224() hash.Hash {
- if boring.Enabled {
+ if boring.Enabled && boring.SupportsHash(crypto.SHA224) {
Expand Down Expand Up @@ -1308,9 +1308,9 @@ index be10b71bd2269b..d879139773d1d7 100644
+ fipstls.Abandon()
+}
+
func TestBoringServerProtocolVersion(t *testing.T) {
test := func(t *testing.T, name string, v uint16, msg string) {
t.Run(name, func(t *testing.T) {
func allCipherSuitesIncludingTLS13() []uint16 {
s := allCipherSuites()
for _, suite := range cipherSuitesTLS13 {
diff --git a/src/crypto/tls/cipher_suites.go b/src/crypto/tls/cipher_suites.go
index eebc66880d631f..42a26005ff31f2 100644
--- a/src/crypto/tls/cipher_suites.go
Expand Down Expand Up @@ -1708,8 +1708,8 @@ index 33fd0ed52b1ff6..ffc3eeca9dbf95 100644
+}
+
func boringRSAKey(t *testing.T, size int) *rsa.PrivateKey {
t.Helper()
k, err := rsa.GenerateKey(rand.Reader, size)
if err != nil {
diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go
index 441cf8d051c934..ca6a512bf95c7e 100644
--- a/src/go/build/deps_test.go
Expand Down
2 changes: 1 addition & 1 deletion patches/0003-Add-BoringSSL-crypto-backend.patch
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ index 00000000000000..7c5fbeea717618
+
+func NewAESCipher(key []byte) (cipher.Block, error) { return boring.NewAESCipher(key) }
+func NewGCMTLS(c cipher.Block) (cipher.AEAD, error) { return boring.NewGCMTLS(c) }
+func NewGCMTLS13(c cipher.Block) (cipher.AEAD, error) { panic("cryptobackend: not available") }
+func NewGCMTLS13(c cipher.Block) (cipher.AEAD, error) { return boring.NewGCMTLS13(c) }
+
+type PublicKeyECDSA = boring.PublicKeyECDSA
+type PrivateKeyECDSA = boring.PrivateKeyECDSA
Expand Down
6 changes: 3 additions & 3 deletions patches/0005-Add-CNG-crypto-backend.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ index 7a6455fefb4bed..ac91a5201b6581 100644

require (
github.com/golang-fips/openssl/v2 v2.0.4-0.20240917142644-14fd57070072
+ github.com/microsoft/go-crypto-winnative v0.0.0-20240927070024-fde854564ffb
+ github.com/microsoft/go-crypto-winnative v0.0.0-20240929074641-3e2be6d20709
golang.org/x/crypto v0.25.1-0.20240722173533-bb80217080b0
golang.org/x/net v0.27.1-0.20240722181819-765c7e89b3bd
)
Expand All @@ -1030,8 +1030,8 @@ index b8e460e0a13c1c..19b381f6211587 100644
@@ -1,5 +1,7 @@
github.com/golang-fips/openssl/v2 v2.0.4-0.20240917142644-14fd57070072 h1:MiLLfnjVDjuOST8SQ7XgeBpWMWPpVb8VKDhL5Uvco7Q=
github.com/golang-fips/openssl/v2 v2.0.4-0.20240917142644-14fd57070072/go.mod h1:OYUBsoxLpFu8OFyhZHxfpN8lgcsw8JhTC3BQK7+XUc0=
+github.com/microsoft/go-crypto-winnative v0.0.0-20240927070024-fde854564ffb h1:b8TGHZrQVCwpRzl9gFJLf3/1IgkdbEc7C8MBatQTgMA=
+github.com/microsoft/go-crypto-winnative v0.0.0-20240927070024-fde854564ffb/go.mod h1:JkxQeL8dGcyCuKjn1Etz4NmQrOMImMy4BA9hptEfVFA=
+github.com/microsoft/go-crypto-winnative v0.0.0-20240929074641-3e2be6d20709 h1:Kno3m3hOXCrrJF9YphNJWNXm6MjIpflQrHWxAIRSIqA=
+github.com/microsoft/go-crypto-winnative v0.0.0-20240929074641-3e2be6d20709/go.mod h1:JkxQeL8dGcyCuKjn1Etz4NmQrOMImMy4BA9hptEfVFA=
golang.org/x/crypto v0.25.1-0.20240722173533-bb80217080b0 h1:wxHbFWyu21uEPJJnYaSDaHSWbvnZ9gLSSOPwnEc3lLM=
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=
Expand Down
Loading

0 comments on commit 2005ada

Please sign in to comment.