summaryrefslogtreecommitdiffstats
path: root/ssl/statem/statem.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-02-24 11:40:49 +0000
committerMatt Caswell <matt@openssl.org>2017-03-02 17:44:15 +0000
commita832b5ef7a6080a6a66d1135c80c9aaf5570fc02 (patch)
tree977d529d181f2f3278b453ff20b72ad48efac854 /ssl/statem/statem.c
parent38df5a452777b612f75796531c0b2629da6aa550 (diff)
Skip early_data if appropriate after a HelloRetryRequest
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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ssl/statem/statem.c b/ssl/statem/statem.c
index 9c74a2932e..2c202f4deb 100644
--- a/ssl/statem/statem.c
+++ b/ssl/statem/statem.c
@@ -157,8 +157,13 @@ int ossl_statem_skip_early_data(SSL *s)
if (s->ext.early_data != SSL_EARLY_DATA_REJECTED)
return 0;
- if (s->statem.hand_state != TLS_ST_SW_FINISHED)
- return 0;
+ if (s->hello_retry_request) {
+ if (s->statem.hand_state != TLS_ST_SW_HELLO_RETRY_REQUEST)
+ return 0;
+ } else {
+ if (s->statem.hand_state != TLS_ST_SW_FINISHED)
+ return 0;
+ }
return 1;
}