Skip to content

Commit 4f74dea

Browse files
committed
chg: [sessions] switch from sha256 to sha1 for consistency with TLS
1 parent 864fc59 commit 4f74dea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

d4tls/tlsdecoder.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package d4tls
22

33
import (
44
"bytes"
5-
"crypto/sha256"
5+
"crypto/sha1"
66
"crypto/x509"
77
"fmt"
88
"time"
@@ -122,7 +122,7 @@ func (t *TLSSession) PopulateCertificate(c *etls.CertificateMsg) {
122122
if err != nil {
123123
//return err
124124
} else {
125-
h := sha256.New()
125+
h := sha1.New()
126126
h.Write(cert.Raw)
127127
t.Record.Certificates = append(t.Record.Certificates, certMapElm{Certificate: cert, CertHash: fmt.Sprintf("%x", h.Sum(nil))})
128128
}

0 commit comments

Comments
 (0)