From 30869911b66690df5ddbdda1bacc45762bcd8979 Mon Sep 17 00:00:00 2001 From: Bas Westerbaan Date: Tue, 10 Oct 2023 16:13:10 +0200 Subject: [PATCH] Send empty keyshare extension instead of leaving it out (#163) --- src/crypto/tls/handshake_messages.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/tls/handshake_messages.go b/src/crypto/tls/handshake_messages.go index 40c54cca58b..b3840f6c10f 100644 --- a/src/crypto/tls/handshake_messages.go +++ b/src/crypto/tls/handshake_messages.go @@ -248,7 +248,7 @@ func (m *clientHelloMsg) marshal() ([]byte, error) { }) }) } - if len(m.keyShares) > 0 { + if m.keyShares != nil { // RFC 8446, Section 4.2.8 exts.AddUint16(extensionKeyShare) exts.AddUint16LengthPrefixed(func(exts *cryptobyte.Builder) {