From e61cfc0ad346d97d75fe296f4c8f6b352df43114 Mon Sep 17 00:00:00 2001 From: Hiroyuki YAMAMORI Date: Wed, 26 Aug 2015 15:04:09 +0100 Subject: Fix DTLS1.2 buffers MIME-Version: 1.0 Content-Type: text/plain; charset=latin1 Content-Transfer-Encoding: 8bit Fix the setup of DTLS1.2 buffers to take account of the Header Reviewed-by: Emilia Käsper Reviewed-by: Matt Caswell --- ssl/s3_both.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssl/s3_both.c b/ssl/s3_both.c index 019e21c..09d0661 100644 --- a/ssl/s3_both.c +++ b/ssl/s3_both.c @@ -648,7 +648,7 @@ int ssl3_setup_read_buffer(SSL *s) unsigned char *p; size_t len, align = 0, headerlen; - if (SSL_version(s) == DTLS1_VERSION || SSL_version(s) == DTLS1_BAD_VER) + if (SSL_IS_DTLS(s)) headerlen = DTLS1_RT_HEADER_LENGTH; else headerlen = SSL3_RT_HEADER_LENGTH; @@ -687,7 +687,7 @@ int ssl3_setup_write_buffer(SSL *s) unsigned char *p; size_t len, align = 0, headerlen; - if (SSL_version(s) == DTLS1_VERSION || SSL_version(s) == DTLS1_BAD_VER) + if (SSL_IS_DTLS(s)) headerlen = DTLS1_RT_HEADER_LENGTH + 1; else headerlen = SSL3_RT_HEADER_LENGTH; -- 1.7.12.1