From 4edd4539331c4a41f06e16f43e7d63afd8ddf0d3 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 2 Oct 2008 12:39:31 +0300 Subject: [PATCH] wpa_gui-qt4: Set EAP-FAST provisioning parameters --- wpa_supplicant/wpa_gui-qt4/networkconfig.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/wpa_supplicant/wpa_gui-qt4/networkconfig.cpp b/wpa_supplicant/wpa_gui-qt4/networkconfig.cpp index 9db95d930..c7ccb7348 100644 --- a/wpa_supplicant/wpa_gui-qt4/networkconfig.cpp +++ b/wpa_supplicant/wpa_gui-qt4/networkconfig.cpp @@ -305,14 +305,25 @@ void NetworkConfig::addNetwork() snprintf(phase2, sizeof(phase2), "auth=%s", inner.toAscii().constData()); } else if (eap.compare("FAST") == 0) { - if (inner.startsWith("EAP-")) + char *provisioning = NULL; + if (inner.startsWith("EAP-")) { snprintf(phase2, sizeof(phase2), "auth=%s", inner.right(inner.size() - 4). toAscii().constData()); - else if (inner.compare("GTC(auth) + MSCHAPv2(prov)") == - 0) { + provisioning = "fast_provisioning=2"; + } else if (inner.compare("GTC(auth) + MSCHAPv2(prov)") + == 0) { snprintf(phase2, sizeof(phase2), "auth=GTC MSCHAPV2"); + provisioning = "fast_provisioning=1"; + } + if (provisioning) { + char blob[32]; + setNetworkParam(id, "phase1", provisioning, + true); + snprintf(blob, sizeof(blob), + "blob://fast-pac-%d", id); + setNetworkParam(id, "pac_file", blob, true); } } if (phase2[0])