diff options
author | Matt Caswell <matt@openssl.org> | 2017-02-20 16:35:03 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-03-02 17:44:15 +0000 |
commit | 0a87d0ac628685a1b420851f1614829a952cda5f (patch) | |
tree | f92b975cf18b963c6d0f978a8aca3c458e6fed7b /ssl/statem/statem.c | |
parent | a4f376af7e98161c7513614cf4a110724a5a65f5 (diff) |
Parse the early_data extension
We also skip any early_data that subsequently gets sent. Later commits will
process it if we can.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Diffstat (limited to 'ssl/statem/statem.c')
-rw-r--r-- | ssl/statem/statem.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ssl/statem/statem.c b/ssl/statem/statem.c index 10d794ede7..9ec8e85426 100644 --- a/ssl/statem/statem.c +++ b/ssl/statem/statem.c @@ -151,6 +151,18 @@ void ossl_statem_set_in_handshake(SSL *s, int inhand) s->statem.in_handshake--; } +/* Are we in a sensible state to skip over unreadable early data? */ +int ossl_statem_skip_early_data(SSL *s) +{ + if (!s->ext.expect_early_data) + return 0; + + if (s->statem.hand_state != TLS_ST_SW_FINISHED) + return 0; + + return 1; +} + void ossl_statem_set_hello_verify_done(SSL *s) { s->statem.state = MSG_FLOW_UNINITED; |