]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
TLS client: Send decrypt_error on verify_data validation error
authorJouni Malinen <j@w1.fi>
Sun, 9 Mar 2014 16:19:32 +0000 (18:19 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 9 Mar 2014 16:21:13 +0000 (18:21 +0200)
Previously, this was silently dropped which left the connection waiting
for timeout. decrypt_error alert can be used here to avoid that.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/tls/tlsv1_client_read.c

index 475a6e90334e38ba951ecc7a5838b1652aeb9dbe..8367e361571b8887e4095dfcd843fd50f0bf1869 100644 (file)
@@ -931,6 +931,8 @@ static int tls_process_server_finished(struct tlsv1_client *conn, u8 ct,
 
        if (os_memcmp(pos, verify_data, TLS_VERIFY_DATA_LEN) != 0) {
                wpa_printf(MSG_INFO, "TLSv1: Mismatch in verify_data");
+               tls_alert(conn, TLS_ALERT_LEVEL_FATAL,
+                         TLS_ALERT_DECRYPT_ERROR);
                return -1;
        }