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:41:25 +0000 (16:41 +0000)
commitb8c49611bc26c8f9a980b814496a3069cd524b79
tree92640d3406fcbcd55756c821e9ccaf02e99c20c1
parentc1f84df2484d9d6745f5aaf1eb708f0bcd3faf28
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)
ssl/record/rec_layer_s3.c
ssl/record/record.h
ssl/ssl_lib.c