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:13:49 +0000 (09:13 +0100)
commit4880672a9b41a09a0984b55e219f02a2de7ab75e
tree57ef382cbff79376ffee653ed75c2417a8dbfafc
parent875e3f934e8586039e79efb6ed1262c80803aa42
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>
ssl/record/rec_layer_s3.c