mirror of
https://github.com/openssl/openssl.git
synced 2025-01-24 13:55:42 +08:00
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)
This commit is contained in:
parent
149c4f9816
commit
404fb9965e
@ -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)
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user