Re: [PATCH] Fix IV check and padding removal.

2013-02-12 Thread Ben Laurie
: [PATCH] Fix IV check and padding removal. ... + if (s-version = TLS1_1_VERSION || s-version == DTLS1_VERSION) That's redundant, isn't it? DTLS1_VERSION (0xfeff) is greater than TLS1_1_version (0x302) anyway. DTLS1_BAD_VER isn't though. Changing the DTLS1_VERSION to DTLS1_BAD_VER makes

Re: [PATCH] Fix IV check and padding removal.

2013-02-11 Thread David Woodhouse
On Mon, 2013-02-11 at 20:59 +, David Woodhouse wrote: From 32cc2479b473c49ce869e57fded7e9a77b695c0d Mon Sep 17 00:00:00 2001 From: Dr. Stephen Henson st...@openssl.org Date: Thu, 7 Feb 2013 21:06:37 + Subject: [PATCH] Fix IV check and padding removal. ... + if (s-version

Re: [PATCH] Fix IV check and padding removal.

2013-02-11 Thread David Woodhouse
From 32cc2479b473c49ce869e57fded7e9a77b695c0d Mon Sep 17 00:00:00 2001 From: Dr. Stephen Henson st...@openssl.org Date: Thu, 7 Feb 2013 21:06:37 + Subject: [PATCH] Fix IV check and padding removal. ... + if (s-version = TLS1_1_VERSION || s-version == DTLS1_VERSION) That's redundant

Re: [PATCH] Fix IV check and padding removal.

2013-02-11 Thread David Woodhouse
On Mon, 2013-02-11 at 13:24 -0800, Ben Laurie wrote: Ah, it looks like you only moved the offending code; it was actually Ben's fault in commit 9f27de17 / 014265eb. Gah! I wish tests would pick up stuff like this! As far as I'm aware there are no tests for DTLS1_BAD_VER. Apart from my

Re: [PATCH] Fix IV check and padding removal.

2013-02-11 Thread David Woodhouse
Same fix for 1.0.0 branch: diff --git a/ssl/s3_cbc.c b/ssl/s3_cbc.c index 5b3f371..61413b8 100644 --- a/ssl/s3_cbc.c +++ b/ssl/s3_cbc.c @@ -148,7 +148,7 @@ int tls1_cbc_remove_padding(const SSL* s, unsigned padding_length, good, to_check, i; const unsigned overhead = 1 /* padding