diff --git a/cipher_suites.go b/cipher_suites.go index 1974a5a..4fe3a68 100644 --- a/cipher_suites.go +++ b/cipher_suites.go @@ -417,15 +417,13 @@ func cipherAES(key, iv []byte, isRead bool) any { // macSHA1 returns a SHA-1 based constant time MAC. func macSHA1(key []byte) hash.Hash { - //////////////////////////////////// [REALITY] SECTION: do not use newConstantTimeHash - //h := sha1.New + h := sha1.New // The BoringCrypto SHA1 does not have a constant-time // checksum function, so don't try to use it. //if !boring.Enabled { - //h = newConstantTimeHash(h) + h = newConstantTimeHash(h) //} - return hmac.New(sha1.New, key) - //////////////////////////////////// [REALITY] SECTION END + return hmac.New(h, key) } // macSHA256 returns a SHA-256 based MAC. This is only supported in TLS 1.2 and