Add a test for BIO_read() returning 0 in SSL_read() (and also for write)
authorMatt Caswell <matt@openssl.org>
Thu, 27 Oct 2016 12:46:57 +0000 (13:46 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 28 Oct 2016 08:17:30 +0000 (09:17 +0100)
commitdafa1c85b9bbd8ed3ff1911d00ad7f4e890bafa3
tree4e1e5822661213799972183477b592520ce9fa08
parent122580ef71e4e5f355a1a104c9bfb36feee43759
Add a test for BIO_read() returning 0 in SSL_read() (and also for write)

A BIO_read() 0 return indicates that a failure occurred that may be
retryable. An SSL_read() 0 return indicates a non-retryable failure. Check
that if BIO_read() returns 0, SSL_read() returns <0. Same for SSL_write().

The asyncio test filter BIO already returns 0 on a retryable failure so we
build on that.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit a34ac5b8b9c1a3281b4ee545c46177f485fb4949)
test/asynciotest.c