Check DTLS_BAD_VER for version number.
authorDavid Woodhouse <dwmw2@infradead.org>
Tue, 12 Feb 2013 14:55:32 +0000 (14:55 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 12 Feb 2013 15:14:14 +0000 (15:14 +0000)
The version check for DTLS1_VERSION was redundant as
DTLS1_VERSION > TLS1_1_VERSION, however we do need to
check for DTLS1_BAD_VER for compatibility.

PR:2984

ssl/s3_cbc.c

index 2e93657973ab709ae86144c36c894c5aa1782f7f..1db1d8c32a300ad991833dcb5e895d4c77f43dcd 100644 (file)
@@ -146,7 +146,7 @@ int tls1_cbc_remove_padding(const SSL* s,
        unsigned padding_length, good, to_check, i;
        const unsigned overhead = 1 /* padding length byte */ + mac_size;
        /* Check if version requires explicit IV */
        unsigned padding_length, good, to_check, i;
        const unsigned overhead = 1 /* padding length byte */ + mac_size;
        /* Check if version requires explicit IV */
-       if (s->version >= TLS1_1_VERSION || s->version == DTLS1_VERSION)
+       if (s->version >= TLS1_1_VERSION || s->version == DTLS1_BAD_VER)
                {
                /* These lengths are all public so we can test them in
                 * non-constant time.
                {
                /* These lengths are all public so we can test them in
                 * non-constant time.