]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EAP-TTLS/PEAP/FAST: Reject unsupported Phase 2 method in configuration
authorJouni Malinen <j@w1.fi>
Sun, 20 Dec 2015 15:32:10 +0000 (17:32 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 20 Dec 2015 15:32:10 +0000 (17:32 +0200)
Instead of using default list of methods, reject a configuration with an
unsupported EAP method at the time the main TLS method is being
initialized.

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

index 67a09560d46f4db7ad05abd6c76a790af9efe2ff..c270832b790980a90b16de1cdd5b54204030c465 100644 (file)
@@ -1039,6 +1039,9 @@ int eap_peer_select_phase2_methods(struct eap_peer_config *config,
                if (vendor == EAP_VENDOR_IETF && method == EAP_TYPE_NONE) {
                        wpa_printf(MSG_ERROR, "TLS: Unsupported Phase2 EAP "
                                   "method '%s'", start);
+                       os_free(methods);
+                       os_free(buf);
+                       return -1;
                } else {
                        num_methods++;
                        _methods = os_realloc_array(methods, num_methods,