Skip to content

Commit

Permalink
Don't skip over early_data if we sent an HRR
Browse files Browse the repository at this point in the history
It is not valid to send early_data after an HRR has been received.

Fixes #6734

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from #6737)
  • Loading branch information
mattcaswell committed Jul 19, 2018
1 parent 1c073b9 commit 1c1e416
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ssl/statem/statem.c
Expand Up @@ -179,7 +179,9 @@ int ossl_statem_skip_early_data(SSL *s)
if (s->ext.early_data != SSL_EARLY_DATA_REJECTED)
return 0;

if (!s->server || s->statem.hand_state != TLS_ST_EARLY_DATA)
if (!s->server
|| s->statem.hand_state != TLS_ST_EARLY_DATA
|| s->hello_retry_request == SSL_HRR_COMPLETE)
return 0;

return 1;
Expand Down

0 comments on commit 1c1e416

Please sign in to comment.