tris: ignore NewSessionTicket messages as client

Prevent unexpected_message alert, PSK resumption is not supported so
ignore the received session ticket as client.
This commit is contained in:
Peter Wu 2017-11-12 02:18:00 +00:00 committed by Peter Wu
parent de3ae8f61d
commit 8523d7d8e0

View File

@ -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