]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
TLS: Assume explicit IV for TLS v1.1 and newer
authorJouni Malinen <j@w1.fi>
Sun, 27 Nov 2011 19:38:25 +0000 (21:38 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 27 Nov 2011 19:38:25 +0000 (21:38 +0200)
This is needed to allow TLS v1.2 to be supported.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/tls/tlsv1_record.c

index dd022a58ecf1261d993813ee71cf7e307081d866..04f3ee254e5148fadab6a245011cdf2eb2e2f57b 100644 (file)
@@ -175,7 +175,7 @@ int tlsv1_record_send(struct tlsv1_record_layer *rl, u8 content_type, u8 *buf,
 
        cpayload = pos;
        explicit_iv = rl->write_cipher_suite != TLS_NULL_WITH_NULL_NULL &&
-               rl->iv_size && rl->tls_version == TLS_VERSION_1_1;
+               rl->iv_size && rl->tls_version >= TLS_VERSION_1_1;
        if (explicit_iv) {
                /* opaque IV[Cipherspec.block_length] */
                if (pos + rl->iv_size > buf + buf_size)
@@ -377,7 +377,7 @@ int tlsv1_record_receive(struct tlsv1_record_layer *rl,
                         * attacks more difficult.
                         */
 
-                       if (rl->tls_version == TLS_VERSION_1_1) {
+                       if (rl->tls_version >= TLS_VERSION_1_1) {
                                /* Remove opaque IV[Cipherspec.block_length] */
                                if (plen < rl->iv_size) {
                                        wpa_printf(MSG_DEBUG, "TLSv1.1: Not "