summaryrefslogtreecommitdiff
path: root/gsupplicant
diff options
context:
space:
mode:
authorNiraj Kumar Goit <niraj.g@samsung.com>2016-06-14 15:26:18 (GMT)
committerNiraj Kumar Goit <niraj.g@samsung.com>2016-06-14 15:26:18 (GMT)
commit8bf82d09ca26e4d463314948de7154aac1806d37 (patch)
treefa18da68ae0d3ad644de43ea861fccc9673dac2c /gsupplicant
parent8cff34042d8ca5e5600e3e717b50df3b8c2cdb68 (diff)
downloadconnman-8bf82d09ca26e4d463314948de7154aac1806d37.zip
connman-8bf82d09ca26e4d463314948de7154aac1806d37.tar.gz
connman-8bf82d09ca26e4d463314948de7154aac1806d37.tar.bz2
[SPIN] support ft-psk and ft-eap security type.refs/changes/13/74513/1
Change-Id: Idc4ff4294ada3b234dd4af29558c0923b9aff017 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Diffstat (limited to 'gsupplicant')
-rwxr-xr-xgsupplicant/gsupplicant.h9
-rwxr-xr-xgsupplicant/supplicant.c52
2 files changed, 61 insertions, 0 deletions
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h
index e47421a..776f613 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 806b4bd..30237a3 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",