diff options
author | Niraj Kumar Goit <niraj.g@samsung.com> | 2016-06-14 20:56:18 +0530 |
---|---|---|
committer | Niraj Kumar Goit <niraj.g@samsung.com> | 2016-06-14 20:56:18 +0530 |
commit | 8bf82d09ca26e4d463314948de7154aac1806d37 (patch) | |
tree | fa18da68ae0d3ad644de43ea861fccc9673dac2c | |
parent | 8cff34042d8ca5e5600e3e717b50df3b8c2cdb68 (diff) | |
download | connman-8bf82d09ca26e4d463314948de7154aac1806d37.tar.gz connman-8bf82d09ca26e4d463314948de7154aac1806d37.tar.bz2 connman-8bf82d09ca26e4d463314948de7154aac1806d37.zip |
[SPIN] support ft-psk and ft-eap security type.
Change-Id: Idc4ff4294ada3b234dd4af29558c0923b9aff017
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
-rwxr-xr-x | gsupplicant/gsupplicant.h | 9 | ||||
-rwxr-xr-x | gsupplicant/supplicant.c | 52 | ||||
-rwxr-xr-x | plugins/wifi.c | 6 | ||||
-rwxr-xr-x | src/service.c | 6 |
4 files changed, 73 insertions, 0 deletions
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h index e47421a4..776f6136 100755 --- a/gsupplicant/gsupplicant.h +++ b/gsupplicant/gsupplicant.h @@ -56,8 +56,13 @@ extern "C" { #define G_SUPPLICANT_KEYMGMT_WPA_NONE (1 << 2) #define G_SUPPLICANT_KEYMGMT_WPA_PSK (1 << 3) #define G_SUPPLICANT_KEYMGMT_WPA_PSK_256 (1 << 4) +#if defined TIZEN_EXT +#define G_SUPPLICANT_KEYMGMT_WPA_FT_EAP (1 << 5) +#define G_SUPPLICANT_KEYMGMT_WPA_FT_PSK (1 << 6) +#else #define G_SUPPLICANT_KEYMGMT_WPA_FT_PSK (1 << 5) #define G_SUPPLICANT_KEYMGMT_WPA_FT_EAP (1 << 6) +#endif #define G_SUPPLICANT_KEYMGMT_WPA_EAP (1 << 7) #define G_SUPPLICANT_KEYMGMT_WPA_EAP_256 (1 << 8) #define G_SUPPLICANT_KEYMGMT_WPS (1 << 9) @@ -97,6 +102,10 @@ typedef enum { G_SUPPLICANT_SECURITY_WEP, G_SUPPLICANT_SECURITY_PSK, G_SUPPLICANT_SECURITY_IEEE8021X, +#if defined TIZEN_EXT + G_SUPPLICANT_SECURITY_FT_PSK, + G_SUPPLICANT_SECURITY_FT_IEEE8021X, +#endif } GSupplicantSecurity; typedef enum { diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 806b4bdf..30237a32 100755 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -205,6 +205,10 @@ struct g_supplicant_bss { dbus_bool_t privacy; dbus_bool_t psk; dbus_bool_t ieee8021x; +#if defined TIZEN_EXT + dbus_bool_t ft_psk; + dbus_bool_t ft_ieee8021x; +#endif unsigned int wps_capabilities; }; @@ -316,6 +320,12 @@ static const char *security2string(GSupplicantSecurity security) return "psk"; case G_SUPPLICANT_SECURITY_IEEE8021X: return "ieee8021x"; +#if defined TIZEN_EXT + case G_SUPPLICANT_SECURITY_FT_PSK: + return "ft_psk"; + case G_SUPPLICANT_SECURITY_FT_IEEE8021X: + return "ft_ieee8021x"; +#endif } return NULL; @@ -1846,23 +1856,51 @@ static void bss_compute_security(struct g_supplicant_bss *bss) bss->ieee8021x = FALSE; bss->psk = FALSE; +#if defined TIZEN_EXT + bss->ft_ieee8021x = FALSE; + bss->ft_psk = FALSE; +#endif +#if defined TIZEN_EXT + if (bss->keymgmt & + (G_SUPPLICANT_KEYMGMT_WPA_EAP | + G_SUPPLICANT_KEYMGMT_WPA_EAP_256)) + bss->ieee8021x = TRUE; + else if (bss->keymgmt & G_SUPPLICANT_KEYMGMT_WPA_FT_EAP) + bss->ft_ieee8021x = TRUE; +#else if (bss->keymgmt & (G_SUPPLICANT_KEYMGMT_WPA_EAP | G_SUPPLICANT_KEYMGMT_WPA_FT_EAP | G_SUPPLICANT_KEYMGMT_WPA_EAP_256)) bss->ieee8021x = TRUE; +#endif +#if defined TIZEN_EXT + if (bss->keymgmt & + (G_SUPPLICANT_KEYMGMT_WPA_PSK | + G_SUPPLICANT_KEYMGMT_WPA_PSK_256)) + bss->psk = TRUE; + else if (bss->keymgmt & G_SUPPLICANT_KEYMGMT_WPA_FT_PSK) + bss->ft_psk = TRUE; +#else if (bss->keymgmt & (G_SUPPLICANT_KEYMGMT_WPA_PSK | G_SUPPLICANT_KEYMGMT_WPA_FT_PSK | G_SUPPLICANT_KEYMGMT_WPA_PSK_256)) bss->psk = TRUE; +#endif if (bss->ieee8021x) bss->security = G_SUPPLICANT_SECURITY_IEEE8021X; else if (bss->psk) bss->security = G_SUPPLICANT_SECURITY_PSK; +#if defined TIZEN_EXT + else if (bss->ft_psk) + bss->security = G_SUPPLICANT_SECURITY_FT_PSK; + else if (bss->ft_ieee8021x == TRUE) + bss->security = G_SUPPLICANT_SECURITY_IEEE8021X; +#endif else if (bss->privacy) bss->security = G_SUPPLICANT_SECURITY_WEP; else @@ -4761,6 +4799,20 @@ static void add_network_security(DBusMessageIter *dict, GSupplicantSSID *ssid) add_network_security_ciphers(dict, ssid); add_network_security_proto(dict, ssid); break; +#if defined TIZEN_EXT + case G_SUPPLICANT_SECURITY_FT_PSK: + key_mgmt = "FT-PSK"; + add_network_security_psk(dict, ssid); + add_network_security_ciphers(dict, ssid); + add_network_security_proto(dict, ssid); + break; + case G_SUPPLICANT_SECURITY_FT_IEEE8021X: + key_mgmt = "FT-EAP"; + add_network_security_eap(dict, ssid); + add_network_security_ciphers(dict, ssid); + add_network_security_proto(dict, ssid); + break; +#endif } supplicant_dbus_dict_append_basic(dict, "key_mgmt", diff --git a/plugins/wifi.c b/plugins/wifi.c index 66e6bd17..570c97d0 100755 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -2104,6 +2104,12 @@ static GSupplicantSecurity network_security(const char *security) return G_SUPPLICANT_SECURITY_PSK; else if (g_str_equal(security, "ieee8021x")) return G_SUPPLICANT_SECURITY_IEEE8021X; +#if defined TIZEN_EXT + else if (g_str_equal(security, "ft_psk") == TRUE) + return G_SUPPLICANT_SECURITY_FT_PSK; + else if (g_str_equal(security, "ft_ieee8021x") == TRUE) + return G_SUPPLICANT_SECURITY_FT_IEEE8021X; +#endif return G_SUPPLICANT_SECURITY_UNKNOWN; } diff --git a/src/service.c b/src/service.c index cb5122ca..22da1e29 100755 --- a/src/service.c +++ b/src/service.c @@ -7824,6 +7824,12 @@ static enum connman_service_security convert_wifi_security(const char *security) return CONNMAN_SERVICE_SECURITY_WPA; else if (g_str_equal(security, "rsn")) return CONNMAN_SERVICE_SECURITY_RSN; +#if defined TIZEN_EXT + else if (g_str_equal(security, "ft_psk") == TRUE) + return CONNMAN_SERVICE_SECURITY_PSK; + else if (g_str_equal(security, "ft_ieee8021x") == TRUE) + return CONNMAN_SERVICE_SECURITY_8021X; +#endif else return CONNMAN_SERVICE_SECURITY_UNKNOWN; } |