chg: [sessions] switch from sha256 to sha1 for consistency with TLS

master
Jean-Louis Huynen 2019-06-12 15:06:22 +02:00
parent 864fc59d02
commit 4f74dea4e3
No known key found for this signature in database
GPG Key ID: 64799157F4BD6B93
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ package d4tls
import ( import (
"bytes" "bytes"
"crypto/sha256" "crypto/sha1"
"crypto/x509" "crypto/x509"
"fmt" "fmt"
"time" "time"
@ -122,7 +122,7 @@ func (t *TLSSession) PopulateCertificate(c *etls.CertificateMsg) {
if err != nil { if err != nil {
//return err //return err
} else { } else {
h := sha256.New() h := sha1.New()
h.Write(cert.Raw) h.Write(cert.Raw)
t.Record.Certificates = append(t.Record.Certificates, certMapElm{Certificate: cert, CertHash: fmt.Sprintf("%x", h.Sum(nil))}) t.Record.Certificates = append(t.Record.Certificates, certMapElm{Certificate: cert, CertHash: fmt.Sprintf("%x", h.Sum(nil))})
} }