]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Check TLS status on EAP server during handshake
authorJouni Malinen <j@w1.fi>
Sun, 20 Dec 2009 17:11:43 +0000 (19:11 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 20 Dec 2009 17:11:43 +0000 (19:11 +0200)
The new TLS wrapper use may end up returning alert data and we need to
make sure here that it does not end up getting interpreted as success
due to non-NULL response.

src/eap_server/eap_tls_common.c

index c4c7806ed8877530449feeaa2f8ba14592135227..7a2c76a26e96d77bbb914a4a971333c3d3323a05 100644 (file)
@@ -254,6 +254,12 @@ int eap_server_tls_phase1(struct eap_sm *sm, struct eap_ssl_data *data)
                wpa_printf(MSG_INFO, "SSL: TLS processing failed");
                return -1;
        }
+       if (tls_connection_get_failed(sm->ssl_ctx, data->conn)) {
+               /* TLS processing has failed - return error */
+               wpa_printf(MSG_DEBUG, "SSL: Failed - out_buf available to "
+                          "report error");
+               return -1;
+       }
 
        return 0;
 }