Fix ssl3_do_write() to correctly handle retries
authorMatt Caswell <matt@openssl.org>
Wed, 12 Jul 2023 14:50:25 +0000 (15:50 +0100)
committerPauli <pauli@openssl.org>
Sun, 16 Jul 2023 23:43:21 +0000 (09:43 +1000)
commit44ba3901f65b2bb97b3d9f76dd8add3a2e4ae994
treea8af8d93b8c5e9f5f4dd21f44dd3bdf9d541a8d0
parent51af5f2eac820a99c68c831556993fcbca4b4768
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/21435)

(cherry picked from commit 034ea1d00e5816f35c3e4799d5c122e198e14b59)
ssl/statem/statem_lib.c