From f0eb5a60f18b9cef17d65a4b32c7395dcbe34aa7 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 8 Feb 2018 11:09:42 +0800 Subject: [PATCH] don't accept transport parameters in the NewSessionTicket message This was recently removed from the WG draft. --- internal/handshake/tls_extension_handler_client.go | 7 +------ internal/handshake/tls_extension_handler_client_test.go | 8 -------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/internal/handshake/tls_extension_handler_client.go b/internal/handshake/tls_extension_handler_client.go index 20d2d06b..ddb09c02 100644 --- a/internal/handshake/tls_extension_handler_client.go +++ b/internal/handshake/tls_extension_handler_client.go @@ -63,17 +63,12 @@ func (h *extensionHandlerClient) Receive(hType mint.HandshakeType, el *mint.Exte return err } - if hType != mint.HandshakeTypeEncryptedExtensions && hType != mint.HandshakeTypeNewSessionTicket { + if hType != mint.HandshakeTypeEncryptedExtensions { if found { return fmt.Errorf("Unexpected QUIC extension in handshake message %d", hType) } return nil } - if hType == mint.HandshakeTypeNewSessionTicket { - // the extension it's optional in the NewSessionTicket message - // TODO: handle this - return nil - } // hType == mint.HandshakeTypeEncryptedExtensions if !found { diff --git a/internal/handshake/tls_extension_handler_client_test.go b/internal/handshake/tls_extension_handler_client_test.go index 05cfae5e..a856daa2 100644 --- a/internal/handshake/tls_extension_handler_client_test.go +++ b/internal/handshake/tls_extension_handler_client_test.go @@ -100,14 +100,6 @@ var _ = Describe("TLS Extension Handler, for the client", func() { Expect(err).ToNot(HaveOccurred()) }) - // TODO: fix this when implementing the NewSessionTicket - It("ignors the TransportParameters in the NewSessionTicket message", func() { - err := el.Add(fakeBody) - Expect(err).ToNot(HaveOccurred()) - err = handler.Receive(mint.HandshakeTypeNewSessionTicket, &el) - Expect(err).ToNot(HaveOccurred()) - }) - It("errors when it can't parse the TransportParameters", func() { err := el.Add(fakeBody) Expect(err).ToNot(HaveOccurred())