Skip to content

Commit 04a4cdb

Browse files
Fix use of weak cryptographic hash function (MD5)
Signed-off-by: apocalypse9949 <125962989+apocalypse9949@users.noreply.github.com>
1 parent 0c423ac commit 04a4cdb

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

common/deliverclient/orderers/connection.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ package orderers
88

99
import (
1010
"bytes"
11-
"crypto/md5"
1211
"crypto/sha256"
1312
"fmt"
1413
"math/rand/v2"
@@ -41,7 +40,7 @@ func (e *Endpoint) String() string {
4140
certHashStr := "<nil>"
4241

4342
if e.RootCerts != nil {
44-
hasher := md5.New()
43+
hasher := sha256.New()
4544
for _, cert := range e.RootCerts {
4645
hasher.Write(cert)
4746
}

0 commit comments

Comments
 (0)