From 8523d7d8e060fdc6ccde5594b605861b027cd270 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sun, 12 Nov 2017 02:18:00 +0000 Subject: [PATCH] tris: ignore NewSessionTicket messages as client Prevent unexpected_message alert, PSK resumption is not supported so ignore the received session ticket as client. --- conn.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conn.go b/conn.go index 5fd2b13..665cbda 100644 --- a/conn.go +++ b/conn.go @@ -1256,6 +1256,12 @@ func (c *Conn) handlePostHandshake() error { switch hm := msg.(type) { case *helloRequestMsg: return c.handleRenegotiation(hm) + case *newSessionTicketMsg13: + if !c.isClient { + c.sendAlert(alertUnexpectedMessage) + return alertUnexpectedMessage + } + return nil // TODO implement session tickets default: c.sendAlert(alertUnexpectedMessage) return alertUnexpectedMessage