supplicant: Support EAP phase2 authentication methods
authorHenri Bragge <henri.bragge@ixonos.com>
Mon, 10 Jan 2011 11:41:40 +0000 (13:41 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 10 Jan 2011 17:34:54 +0000 (18:34 +0100)
plugins/supplicant.c

index 4458f83..493ee8b 100644 (file)
@@ -1210,7 +1210,11 @@ static int set_network_peap(struct connman_network *network,
                connman_info("No client certificate has been provided "
                             "to do the PEAP/TTLS authentication\n");
 
-       phase2_auth = g_strdup_printf("auth=%s", phase2);
+       if (g_str_has_prefix(phase2, "EAP-") == TRUE) {
+               phase2_auth = g_strdup_printf("autheap=%s",
+                                               phase2 + strlen("EAP-"));
+       } else
+               phase2_auth = g_strdup_printf("auth=%s", phase2);
 
        connman_dbus_dict_append_basic(dict, "password",
                                                DBUS_TYPE_STRING, &passphrase);