Provide a function to test whether we have unread records pending
authorMatt Caswell <matt@openssl.org>
Fri, 3 Mar 2017 12:41:39 +0000 (12:41 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 7 Mar 2017 16:45:34 +0000 (16:45 +0000)
commitb1f723c503b371776b2ae67a8cb78c8765387174
treebf325314391ad008e8e6ab5e002dabfe47bacfaa
parent9c8d082a44b663ed4cdd472dcc3f21831d0b92be
Provide a function to test whether we have unread records pending

Also updates SSL_has_pending() to use it. This actually fixes a bug in
SSL_has_pending() which is supposed to return 1 if we have any processed
or unprocessed data sitting in OpenSSL buffers. However it failed to return
1 if we had processed non-application data pending.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2875)
(cherry picked from commit b8c49611bc26c8f9a980b814496a3069cd524b79)
ssl/record/rec_layer_s3.c
ssl/record/record.h
ssl/ssl_lib.c