A zero return from BIO_read/BIO_write() could be retryable
authorMatt Caswell <matt@openssl.org>
Fri, 21 Oct 2016 13:49:33 +0000 (14:49 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 28 Oct 2016 08:19:49 +0000 (09:19 +0100)
commitfa4c374572e94f467900f5820cd1d00af2470a17
treedd3765c7b5470c44e578eda694366fa2720ac7e8
parent31bf65c89a43b4a1b3dd942c3e71d4573a0d4d66
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/s23_pkt.c
ssl/s2_pkt.c
ssl/s3_pkt.c