diff options
author | Niraj Kumar Goit <niraj.g@samsung.com> | 2018-02-15 16:49:26 +0530 |
---|---|---|
committer | taesub kim <taesub.kim@samsung.com> | 2018-02-26 17:44:08 +0900 |
commit | ca78e0cbb13bbd69de43f9a5d3f05d9ce51f58d1 (patch) | |
tree | 5d8a26eec5bd319d09ef2aaf9b5d6395bf92c6c8 /gsupplicant | |
parent | 63d4f774d04c381000e45e7490bc838da9b36027 (diff) | |
download | connman-ca78e0cbb13bbd69de43f9a5d3f05d9ce51f58d1.tar.gz connman-ca78e0cbb13bbd69de43f9a5d3f05d9ce51f58d1.tar.bz2 connman-ca78e0cbb13bbd69de43f9a5d3f05d9ce51f58d1.zip |
[connman]Added support of EAP-FAST,EAP-PWD and EAP-AKA'.submit/tizen/20180226.110934accepted/tizen/unified/20180227.062953
Change-Id: Ibb75ff2c2e54c8d3d53f3b184502647918bf7e24
igned-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Diffstat (limited to 'gsupplicant')
-rwxr-xr-x | gsupplicant/gsupplicant.h | 12 | ||||
-rw-r--r-- | gsupplicant/supplicant.c | 43 |
2 files changed, 53 insertions, 2 deletions
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h index 0476ff66..ead619c4 100755 --- a/gsupplicant/gsupplicant.h +++ b/gsupplicant/gsupplicant.h @@ -108,6 +108,15 @@ typedef enum { #endif } GSupplicantSecurity; +#if defined TIZEN_EXT +typedef enum { + G_SUPPLICANT_EAP_KEYMGMT_NONE, + G_SUPPLICANT_EAP_KEYMGMT_FT, + G_SUPPLICANT_EAP_KEYMGMT_CCKM, + G_SUPPLICANT_EAP_KEYMGMT_OKC, +} GSupplicantEapKeymgmt; +#endif + typedef enum { G_SUPPLICANT_STATE_UNKNOWN, G_SUPPLICANT_STATE_DISABLED, @@ -175,6 +184,9 @@ struct _GSupplicantSSID { unsigned char *bssid; unsigned int bssid_for_connect_len; unsigned char bssid_for_connect[6]; + GSupplicantEapKeymgmt eap_keymgmt; + const char *phase1; + const char *pac_file; #endif }; diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 9b7a9349..92efbc9c 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -5131,6 +5131,33 @@ static void add_network_security_aka_sim(DBusMessageIter *dict, DBUS_TYPE_STRING, &ssid->passphrase); } + +static void add_network_security_fast(DBusMessageIter *dict, + GSupplicantSSID *ssid) +{ + /* + * For FAST, we at least need: + * id / password + * phase1 (provisiong information) + * pac_file + */ + + /* Allow provisioing both authenticated and unauthenticated */ + const char *phase1 = "fast_provisioning=2"; + supplicant_dbus_dict_append_basic(dict, "phase1", + DBUS_TYPE_STRING, + &phase1); + + SUPPLICANT_DBG("pac_file [%s]", ssid->pac_file); + if(ssid->pac_file) + supplicant_dbus_dict_append_basic(dict, "pac_file", + DBUS_TYPE_STRING, + &ssid->pac_file); + + supplicant_dbus_dict_append_basic(dict, "password", + DBUS_TYPE_STRING, + &ssid->passphrase); +} #endif static void add_network_security_eap(DBusMessageIter *dict, @@ -5157,8 +5184,20 @@ static void add_network_security_eap(DBusMessageIter *dict, #if defined TIZEN_EXT } else if (g_strcmp0(ssid->eap, "sim") == 0 || - g_strcmp0(ssid->eap, "aka") == 0) { + g_strcmp0(ssid->eap, "aka") == 0 || + g_strcmp0(ssid->eap, "aka'") == 0) { add_network_security_aka_sim(dict, ssid); + } else if (g_strcmp0(ssid->eap, "pwd") == 0) { + if(!ssid->passphrase) + return; + supplicant_dbus_dict_append_basic(dict, "password", + DBUS_TYPE_STRING, + &ssid->passphrase); + } else if (g_strcmp0(ssid->eap, "fast") == 0){ + if (!ssid->identity || !ssid->passphrase) + return; + + add_network_security_fast(dict, ssid); #endif } else return; @@ -5738,7 +5777,7 @@ int g_supplicant_interface_connect(GSupplicantInterface *interface, network_remove(intf_data); } else #if defined TIZEN_EXT - if (ssid->passphrase && g_strcmp0(ssid->passphrase, "") != 0) { + if (ssid->passphrase && g_strcmp0(ssid->passphrase, "") != 0 && !ssid->eap) { ret = send_decryption_request(ssid->passphrase, data); if (ret < 0) SUPPLICANT_DBG("Decryption request failed %d", ret); |