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:18:43 +0000 (10:18 +0100)
commit9e43fe9a2bd38f06385b5b721f7c4b3ff0e4163f
tree57376b1f40b8c0a52399d60861dee8558fa02c0d
parent374fd385c2347b965c3490aa1c10025e1339d265
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>
(cherry picked from commit 5e8b24dbfb98ed7c5b355cb6a959906a418e264b)
ssl/s3_pkt.c