diff options
author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2017-04-03 14:17:58 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-04-03 19:07:29 +0100 |
commit | bbea9f2c5f6a134505a899383c22098f3406c5f5 (patch) | |
tree | 29c73977333ef9538da59faed423ced6bb19be72 /ssl | |
parent | f8a303fa7d6dbda31dc253f691d0e3224681ec2e (diff) | |
download | openssl-bbea9f2c5f6a134505a899383c22098f3406c5f5.tar.gz |
Restore s->early_data_state with the original value
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3091)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl_lib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 61e1a7a4c8..5b5bff1faa 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1830,12 +1830,14 @@ int SSL_write_early_data(SSL *s, const void *buf, size_t num, size_t *written) return ret; case SSL_EARLY_DATA_FINISHED_READING: - case SSL_EARLY_DATA_READ_RETRY: + case SSL_EARLY_DATA_READ_RETRY: { + int early_data_state = s->early_data_state; /* We are a server writing to an unauthenticated client */ s->early_data_state = SSL_EARLY_DATA_UNAUTH_WRITING; ret = SSL_write_ex(s, buf, num, written); - s->early_data_state = SSL_EARLY_DATA_READ_RETRY; + s->early_data_state = early_data_state; return ret; + } default: SSLerr(SSL_F_SSL_WRITE_EARLY_DATA, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); |