diff options
author | Matt Caswell <matt@openssl.org> | 2023-07-12 15:50:25 +0100 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2023-07-17 09:39:46 +1000 |
commit | 404fb9965ed0dc7752d80f72c93358dfb45125c8 (patch) | |
tree | f1e3703a5e40ee8c36f3bb62e6e283ebe73e083c | |
parent | 149c4f98168ba19432986e82d30d15bd41bae475 (diff) |
Fix ssl3_do_write() to correctly handle retries
A BIO is documented to return -1 on write retry - but sometimes they return
0. ssl3_do_write() was incorrectly handling a 0 response.
Fixes #21422
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21434)
-rw-r--r-- | ssl/statem/statem_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index 635e84a764..406788bbfc 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -92,7 +92,7 @@ int ssl3_do_write(SSL_CONNECTION *s, int type) ret = ssl3_write_bytes(ssl, type, &s->init_buf->data[s->init_off], s->init_num, &written); - if (ret < 0) + if (ret <= 0) return -1; if (type == SSL3_RT_HANDSHAKE) /* |