chg: [sessions] switch from sha256 to sha1 for consistency with TLS
parent
864fc59d02
commit
4f74dea4e3
|
@ -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))})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue