From 12d84c419609571bed143ca5174b23986efee1a4 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Wed, 16 Aug 2023 10:09:01 +0700 Subject: [PATCH] handshake: use the correct hash function for TLS_AES_256_GCM_SHA384 (#4031) --- internal/handshake/cipher_suite.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/handshake/cipher_suite.go b/internal/handshake/cipher_suite.go index 608d5ea00e6..265231f0c60 100644 --- a/internal/handshake/cipher_suite.go +++ b/internal/handshake/cipher_suite.go @@ -30,7 +30,7 @@ func getCipherSuite(id uint16) *cipherSuite { case tls.TLS_CHACHA20_POLY1305_SHA256: return &cipherSuite{ID: tls.TLS_CHACHA20_POLY1305_SHA256, Hash: crypto.SHA256, KeyLen: 32, AEAD: aeadChaCha20Poly1305} case tls.TLS_AES_256_GCM_SHA384: - return &cipherSuite{ID: tls.TLS_AES_256_GCM_SHA384, Hash: crypto.SHA256, KeyLen: 32, AEAD: aeadAESGCMTLS13} + return &cipherSuite{ID: tls.TLS_AES_256_GCM_SHA384, Hash: crypto.SHA384, KeyLen: 32, AEAD: aeadAESGCMTLS13} default: panic(fmt.Sprintf("unknown cypher suite: %d", id)) }