Move state machine knowledge out of the record layer
authorMatt Caswell <matt@openssl.org>
Tue, 10 Jan 2017 23:02:28 +0000 (23:02 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 30 Jan 2017 10:17:00 +0000 (10:17 +0000)
commitc7f47786a5e5f68dc33091ffb2a42e51a73de3a1
tree6ca73f81c1017d62f50a09cd130fdb013df8b0f4
parent0386aad1ab472a4059da85131cceca15aab5ebae
Move state machine knowledge out of the record layer

The record layer was making decisions that should really be left to the
state machine around unexpected handshake messages that are received after
the initial handshake (i.e. renegotiation related messages). This commit
removes that code from the record layer and updates the state machine
accordingly. This simplifies the state machine and paves the way for
handling other messages post-handshake such as the NewSessionTicket in
TLSv1.3.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2259)
16 files changed:
include/openssl/ssl.h
ssl/record/rec_layer_d1.c
ssl/record/rec_layer_s3.c
ssl/s3_lib.c
ssl/ssl_err.c
ssl/ssl_lib.c
ssl/ssl_locl.h
ssl/statem/extensions_clnt.c
ssl/statem/extensions_srvr.c
ssl/statem/statem.c
ssl/statem/statem.h
ssl/statem/statem_clnt.c
ssl/statem/statem_dtls.c
ssl/statem/statem_lib.c
ssl/statem/statem_locl.h
ssl/statem/statem_srvr.c