diff options
author | Ana Cabral <acabral@redhat.com> | 2022-03-08 14:14:29 +0100 |
---|---|---|
committer | Ana Cabral <acabral@redhat.com> | 2022-03-20 18:16:38 +0100 |
commit | 163b6a6f50d3af3980111b77b665b137e7abbe44 (patch) | |
tree | 86d1e4e8017b99a5568612dce3f46c9bd7438140 | |
parent | 66449b17d541d6bc55a30463b81cb94bf7de5dbc (diff) | |
download | network-manager-applet-163b6a6f50d3af3980111b77b665b137e7abbe44.tar.gz |
nm-connection-editor: use the new owe implementation in libnmaac/libnma-owe
https://gitlab.gnome.org/GNOME/libnma/-/issues/9
https://gitlab.gnome.org/GNOME/network-manager-applet/-/merge_requests/110/commits
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | meson.build | 1 | ||||
-rw-r--r-- | src/connection-editor/page-wifi-security.c | 21 |
3 files changed, 20 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index bf482ae0..d16973b3 100644 --- a/configure.ac +++ b/configure.ac @@ -67,7 +67,6 @@ LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_16" PKG_CHECK_MODULES(LIBNMA, libnma >= 1.8.27) LIBNMA_CFLAGS="$LIBNMA_CFLAGS -DNMA_VERSION_MIN_REQUIRED=NMA_VERSION_1_8_28" -LIBNMA_CFLAGS="$LIBNMA_CFLAGS -DNMA_VERSION_MAX_ALLOWED=NMA_VERSION_1_8_28" PKG_CHECK_MODULES(LIBSECRET, [libsecret-1 >= 0.18]) diff --git a/meson.build b/meson.build index 6178c0eb..3c188b68 100644 --- a/meson.build +++ b/meson.build @@ -145,7 +145,6 @@ cflags = [ '-DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_16', '-DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_16', '-DNMA_VERSION_MIN_REQUIRED=NMA_VERSION_1_8_28', - '-DNMA_VERSION_MAX_ALLOWED=NMA_VERSION_1_8_28', ] libnm_dep = declare_dependency( diff --git a/src/connection-editor/page-wifi-security.c b/src/connection-editor/page-wifi-security.c index e8086452..b54de903 100644 --- a/src/connection-editor/page-wifi-security.c +++ b/src/connection-editor/page-wifi-security.c @@ -426,6 +426,18 @@ finish_setup (CEPageWifiSecurity *self, gpointer user_data) } if (security_valid (NMU_SEC_OWE, mode)) { +#if NMA_CHECK_VERSION(1,8,36) + NMAWsOwe *ws_owe; + + ws_owe = nma_ws_owe_new (connection); + if (ws_owe) { + add_security_item (self, NMA_WS (ws_owe), sec_model, + &iter, _("Enhanced Open"), FALSE, TRUE); + if ((active < 0) && ((default_type == NMU_SEC_OWE))) + active = item; + item++; + } +#else gtk_list_store_append (sec_model, &iter); gtk_list_store_set (sec_model, &iter, S_NAME_COLUMN, _("Enhanced Open"), @@ -435,6 +447,7 @@ finish_setup (CEPageWifiSecurity *self, gpointer user_data) if ((active < 0) && (default_type == NMU_SEC_OWE)) active = item; item++; +#endif } combo = GTK_COMBO_BOX (gtk_builder_get_object (parent->builder, "wifi_security_combo")); @@ -580,7 +593,12 @@ ce_page_validate_v (CEPage *page, NMConnection *connection, GError **error) g_object_unref (ws); } else { - +#if NMA_CHECK_VERSION(1,8,36) + /* No security, unencrypted */ + nm_connection_remove_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY); + nm_connection_remove_setting (connection, NM_TYPE_SETTING_802_1X); + valid = TRUE; +#else if (gtk_combo_box_get_active (priv->security_combo) == 0) { /* No security, unencrypted */ nm_connection_remove_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY); @@ -598,6 +616,7 @@ ce_page_validate_v (CEPage *page, NMConnection *connection, GError **error) nm_connection_remove_setting (connection, NM_TYPE_SETTING_802_1X); valid = TRUE; } +#endif } return valid; |