A zero return from BIO_read()/BIO_write() could be retryable
authorMatt Caswell <matt@openssl.org>
Fri, 21 Oct 2016 12:25:19 +0000 (13:25 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 28 Oct 2016 08:17:30 +0000 (09:17 +0100)
commit122580ef71e4e5f355a1a104c9bfb36feee43759
treed76a258f9331a3e532feb18750dbbf709f4bc976
parent207a9cb3522882d1e9dc764c921425ba47a6def6
A zero return from BIO_read()/BIO_write() could be retryable

A zero return from BIO_read()/BIO_write() could mean that an IO operation
is retryable. A zero return from SSL_read()/SSL_write() means that the
connection has been closed down (either cleanly or not). Therefore we
should not propagate a zero return value from BIO_read()/BIO_write() back
up the stack to SSL_read()/SSL_write(). This could result in a retryable
failure being treated as fatal.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 4880672a9b41a09a0984b55e219f02a2de7ab75e)
ssl/record/rec_layer_s3.c