diff options
author | Jaehyun Kim <jeik01.kim@samsung.com> | 2019-07-29 08:58:04 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.ap-northeast-2.compute.internal> | 2019-07-29 08:58:04 +0000 |
commit | d9c4473ac7a38978f0c8922ddb72849320faab75 (patch) | |
tree | 574307584b7c0ca9a15f0801b27cb5d0f3525e34 | |
parent | d9e04fb45fc32e3109e322bd02e6b7e395908ea0 (diff) | |
parent | 744ba68df7010ee6a3a962daad47d106998c15fa (diff) | |
download | connman-d9c4473ac7a38978f0c8922ddb72849320faab75.tar.gz connman-d9c4473ac7a38978f0c8922ddb72849320faab75.tar.bz2 connman-d9c4473ac7a38978f0c8922ddb72849320faab75.zip |
Merge "Add OWE security mode support" into tizensubmit/tizen/20190731.014248submit/tizen/20190729.091802
-rw-r--r-- | gsupplicant/gsupplicant.h | 2 | ||||
-rw-r--r-- | gsupplicant/supplicant.c | 20 | ||||
-rw-r--r-- | include/service.h | 1 | ||||
-rw-r--r-- | plugins/wifi.c | 2 | ||||
-rw-r--r-- | src/service.c | 10 |
5 files changed, 33 insertions, 2 deletions
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h index 155f8464..b9e99a44 100644 --- a/gsupplicant/gsupplicant.h +++ b/gsupplicant/gsupplicant.h @@ -71,6 +71,7 @@ extern "C" { #define G_SUPPLICANT_KEYMGMT_WPS (1 << 9) #if defined TIZEN_EXT #define G_SUPPLICANT_KEYMGMT_SAE (1 << 10) +#define G_SUPPLICANT_KEYMGMT_OWE (1 << 22) #endif #define G_SUPPLICANT_PROTO_WPA (1 << 0) @@ -123,6 +124,7 @@ typedef enum { G_SUPPLICANT_SECURITY_FT_PSK, G_SUPPLICANT_SECURITY_FT_IEEE8021X, G_SUPPLICANT_SECURITY_SAE, + G_SUPPLICANT_SECURITY_OWE, #endif } GSupplicantSecurity; diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index a7a7bd03..66644c8b 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -103,6 +103,7 @@ static struct strvalmap keymgmt_map[] = { { "wps", G_SUPPLICANT_KEYMGMT_WPS }, #if defined TIZEN_EXT { "sae", G_SUPPLICANT_KEYMGMT_SAE }, + { "owe", G_SUPPLICANT_KEYMGMT_OWE }, #endif { } }; @@ -257,6 +258,7 @@ struct g_supplicant_bss { unsigned int wps_capabilities; #if defined TIZEN_EXT dbus_bool_t sae; + dbus_bool_t owe; #endif }; @@ -457,6 +459,8 @@ static const char *security2string(GSupplicantSecurity security) return "ft_ieee8021x"; case G_SUPPLICANT_SECURITY_SAE: return "sae"; + case G_SUPPLICANT_SECURITY_OWE: + return "owe"; #endif } @@ -1655,6 +1659,7 @@ const char *g_supplicant_network_get_enc_mode(GSupplicantNetwork *network) if (network->best_bss->security == G_SUPPLICANT_SECURITY_PSK || #if defined TIZEN_EXT network->best_bss->security == G_SUPPLICANT_SECURITY_SAE || + network->best_bss->security == G_SUPPLICANT_SECURITY_OWE || #endif /* TIZEN_EXT */ network->best_bss->security == G_SUPPLICANT_SECURITY_IEEE8021X) { unsigned int pairwise; @@ -1684,7 +1689,8 @@ bool g_supplicant_network_get_rsn_mode(GSupplicantNetwork *network) return 0; #if defined TIZEN_EXT - if (network->best_bss->security == G_SUPPLICANT_SECURITY_SAE) + if (network->best_bss->security == G_SUPPLICANT_SECURITY_SAE || + network->best_bss->security == G_SUPPLICANT_SECURITY_OWE) return false; #endif /* TIZEN_EXT */ @@ -2497,6 +2503,8 @@ static void bss_compute_security(struct g_supplicant_bss *bss) #if defined TIZEN_EXT if (bss->keymgmt & G_SUPPLICANT_KEYMGMT_SAE) bss->sae = TRUE; + if (bss->keymgmt & G_SUPPLICANT_KEYMGMT_OWE) + bss->owe = TRUE; #endif if (bss->ieee8021x) @@ -2512,6 +2520,8 @@ static void bss_compute_security(struct g_supplicant_bss *bss) #if defined TIZEN_EXT else if (bss->sae) bss->security = G_SUPPLICANT_SECURITY_SAE; + else if (bss->owe) + bss->security = G_SUPPLICANT_SECURITY_OWE; #endif else if (bss->privacy) bss->security = G_SUPPLICANT_SECURITY_WEP; @@ -6174,7 +6184,8 @@ static void add_network_security_proto(DBusMessageIter *dict, #if defined TIZEN_EXT static void add_network_ieee80211w(DBusMessageIter *dict, GSupplicantSSID *ssid) { - if (ssid->security != G_SUPPLICANT_SECURITY_SAE) + if (ssid->security != G_SUPPLICANT_SECURITY_SAE + && ssid->security != G_SUPPLICANT_SECURITY_OWE) return; supplicant_dbus_dict_append_basic(dict, "ieee80211w", DBUS_TYPE_UINT32, @@ -6227,6 +6238,11 @@ static void add_network_security(DBusMessageIter *dict, GSupplicantSSID *ssid) key_mgmt = "SAE"; add_network_security_psk(dict, ssid); break; + case G_SUPPLICANT_SECURITY_OWE: + key_mgmt = "OWE"; + add_network_security_ciphers(dict, ssid); + add_network_security_proto(dict, ssid); + break; #endif } diff --git a/include/service.h b/include/service.h index b2766625..a5ee5ef8 100644 --- a/include/service.h +++ b/include/service.h @@ -70,6 +70,7 @@ enum connman_service_security { CONNMAN_SERVICE_SECURITY_RSN = 9, #if defined TIZEN_EXT CONNMAN_SERVICE_SECURITY_SAE = 10, + CONNMAN_SERVICE_SECURITY_OWE = 11, #endif }; diff --git a/plugins/wifi.c b/plugins/wifi.c index 9d0e3439..8f994230 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -3227,6 +3227,8 @@ static GSupplicantSecurity network_security(const char *security) return G_SUPPLICANT_SECURITY_FT_IEEE8021X; else if (g_str_equal(security, "sae")) return G_SUPPLICANT_SECURITY_SAE; + else if (g_str_equal(security, "owe")) + return G_SUPPLICANT_SECURITY_OWE; #endif return G_SUPPLICANT_SECURITY_UNKNOWN; diff --git a/src/service.c b/src/service.c index c59a2269..6331ae41 100644 --- a/src/service.c +++ b/src/service.c @@ -352,6 +352,8 @@ enum connman_service_security __connman_service_string2security(const char *str) return CONNMAN_SERVICE_SECURITY_RSN; if (!strcmp(str, "sae")) return CONNMAN_SERVICE_SECURITY_SAE; + if (!strcmp(str, "owe")) + return CONNMAN_SERVICE_SECURITY_OWE; #endif return CONNMAN_SERVICE_SECURITY_UNKNOWN; @@ -374,6 +376,8 @@ static const char *security2string(enum connman_service_security security) return "rsn"; case CONNMAN_SERVICE_SECURITY_SAE: return "sae"; + case CONNMAN_SERVICE_SECURITY_OWE: + return "owe"; #else case CONNMAN_SERVICE_SECURITY_RSN: return "psk"; @@ -8216,6 +8220,9 @@ static int service_connect(struct connman_service *service) switch (service->security) { case CONNMAN_SERVICE_SECURITY_UNKNOWN: case CONNMAN_SERVICE_SECURITY_NONE: +#if defined TIZEN_EXT + case CONNMAN_SERVICE_SECURITY_OWE: +#endif break; case CONNMAN_SERVICE_SECURITY_WEP: case CONNMAN_SERVICE_SECURITY_PSK: @@ -8296,6 +8303,7 @@ static int service_connect(struct connman_service *service) case CONNMAN_SERVICE_SECURITY_RSN: #if defined TIZEN_EXT case CONNMAN_SERVICE_SECURITY_SAE: + case CONNMAN_SERVICE_SECURITY_OWE: #endif break; case CONNMAN_SERVICE_SECURITY_8021X: @@ -9050,6 +9058,8 @@ static enum connman_service_security convert_wifi_security(const char *security) #if defined TIZEN_EXT else if (g_str_equal(security, "sae")) return CONNMAN_SERVICE_SECURITY_SAE; + else if (g_str_equal(security, "owe")) + return CONNMAN_SERVICE_SECURITY_OWE; else if (g_str_equal(security, "ft_psk") == TRUE) return CONNMAN_SERVICE_SECURITY_PSK; else if (g_str_equal(security, "ft_ieee8021x") == TRUE) |