From 4f74dea4e3517a20c9a3e5a9680f9e6ceb4434b9 Mon Sep 17 00:00:00 2001 From: Jean-Louis Huynen Date: Wed, 12 Jun 2019 15:06:22 +0200 Subject: [PATCH] chg: [sessions] switch from sha256 to sha1 for consistency with TLS --- d4tls/tlsdecoder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d4tls/tlsdecoder.go b/d4tls/tlsdecoder.go index df8afcb..0ee0785 100644 --- a/d4tls/tlsdecoder.go +++ b/d4tls/tlsdecoder.go @@ -2,7 +2,7 @@ package d4tls import ( "bytes" - "crypto/sha256" + "crypto/sha1" "crypto/x509" "fmt" "time" @@ -122,7 +122,7 @@ func (t *TLSSession) PopulateCertificate(c *etls.CertificateMsg) { if err != nil { //return err } else { - h := sha256.New() + h := sha1.New() h.Write(cert.Raw) t.Record.Certificates = append(t.Record.Certificates, certMapElm{Certificate: cert, CertHash: fmt.Sprintf("%x", h.Sum(nil))}) }