Fix SSL_pending() for DTLS
authorMatt Caswell <matt@openssl.org>
Thu, 19 Apr 2018 15:42:39 +0000 (16:42 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 20 Apr 2018 10:56:30 +0000 (11:56 +0100)
commit71d52f1a8ebdf1d26b6b53e4e1f85f2ff1b0d9b8
treec094cfcfdd1d4feec6b73cd5b49bf064fe19f268
parentf55e2fa7b9d4692b31ad7ad72e71915e853de384
Fix SSL_pending() for DTLS

DTLS was not correctly returning the number of pending bytes left in
a call to SSL_pending(). This makes the detection of truncated packets
almost impossible.

Fixes #5478

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6021)
ssl/record/rec_layer_d1.c