Fix write failure handling in DTLS1.2
authorMatt Caswell <matt@openssl.org>
Wed, 29 Jul 2015 22:20:56 +0000 (23:20 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 30 Jul 2015 09:17:53 +0000 (10:17 +0100)
commit5e8b24dbfb98ed7c5b355cb6a959906a418e264b
tree67f1d94b3e092098bf0d81eb175a20c51605161d
parentfa4629b6a2518d202fd051f228c3d8770682b3be
Fix write failure handling in DTLS1.2

The DTLS code is supposed to drop packets if we try to write them out but
the underlying BIO write buffers are full. ssl3_write_pending() contains
an incorrect test for DTLS that controls this. The test only checks for
DTLS1 so DTLS1.2 does not correctly clear the internal OpenSSL buffer which
can later cause an assert to be hit. This commit changes the test to cover
all DTLS versions.

RT#3967

Reviewed-by: Tim Hudson <tjh@openssl.org>
ssl/record/rec_layer_s3.c