diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2019-11-29 09:16:42 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-02-14 20:03:40 +0100 |
commit | 0b58efdd2e5aab68843cd354d921580bc3b5b514 (patch) | |
tree | 21988a7c03fd0e0f186eca5fb0209593eacab526 /src/wireless-security | |
parent | 9e98e48bec1ce682ff91ef4a55c84c630c126102 (diff) | |
download | network-manager-applet-0b58efdd2e5aab68843cd354d921580bc3b5b514.tar.gz |
all: drop some more libnm-glib vestiges
[thaller@redhat.com: cherry-picked this patch from a larger
merge request and trivial conflict resolution]
https://gitlab.gnome.org/GNOME/network-manager-applet/merge_requests/73
Diffstat (limited to 'src/wireless-security')
-rw-r--r-- | src/wireless-security/eap-method-peap.c | 13 | ||||
-rw-r--r-- | src/wireless-security/eap-method-tls.c | 20 | ||||
-rw-r--r-- | src/wireless-security/eap-method-ttls.c | 15 | ||||
-rw-r--r-- | src/wireless-security/eap-method.c | 6 | ||||
-rw-r--r-- | src/wireless-security/eap-method.h | 14 |
5 files changed, 0 insertions, 68 deletions
diff --git a/src/wireless-security/eap-method-peap.c b/src/wireless-security/eap-method-peap.c index 4c765dbc..8b51f11b 100644 --- a/src/wireless-security/eap-method-peap.c +++ b/src/wireless-security/eap-method-peap.c @@ -131,9 +131,7 @@ fill_connection (EAPMethod *parent, NMConnection *connection) GError *error = NULL; gboolean ca_cert_error = FALSE; NMSetting8021xCKScheme scheme = NM_SETTING_802_1X_CK_SCHEME_UNKNOWN; -#if LIBNM_BUILD NMSettingSecretFlags secret_flags; -#endif s_8021x = nm_connection_get_setting_802_1x (connection); g_assert (s_8021x); @@ -146,16 +144,12 @@ fill_connection (EAPMethod *parent, NMConnection *connection) if (text && strlen (text)) g_object_set (s_8021x, NM_SETTING_802_1X_ANONYMOUS_IDENTITY, text, NULL); -#if LIBNM_BUILD widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_domain_entry")); g_assert (widget); text = gtk_entry_get_text (GTK_ENTRY (widget)); if (text && strlen (text)) g_object_set (s_8021x, NM_SETTING_802_1X_DOMAIN_SUFFIX_MATCH, text, NULL); -#endif -#if LIBNM_BUILD -/* libnm-glib doesn't support this. */ /* Save CA certificate PIN and its flags to the connection */ secret_flags = nma_cert_chooser_get_cert_password_flags (NMA_CERT_CHOOSER (method->ca_cert_chooser)); nm_setting_set_secret_flags (NM_SETTING (s_8021x), NM_SETTING_802_1X_CA_CERT_PASSWORD, @@ -169,7 +163,6 @@ fill_connection (EAPMethod *parent, NMConnection *connection) nma_cert_chooser_get_cert_password (NMA_CERT_CHOOSER (method->ca_cert_chooser)), NULL); } -#endif /* TLS CA certificate */ if (gtk_widget_get_sensitive (method->ca_cert_chooser)) @@ -461,17 +454,11 @@ eap_method_peap_new (WirelessSecurity *ws_parent, ws_parent); widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_domain_entry")); -#if LIBNM_BUILD if (s_8021x && nm_setting_802_1x_get_domain_suffix_match (s_8021x)) gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_802_1x_get_domain_suffix_match (s_8021x)); g_signal_connect (G_OBJECT (widget), "changed", (GCallback) wireless_security_changed_cb, ws_parent); -#else - gtk_widget_hide (widget); - widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_domain_label")); - gtk_widget_hide (widget); -#endif if (secrets_only) { widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_anon_identity_label")); diff --git a/src/wireless-security/eap-method-tls.c b/src/wireless-security/eap-method-tls.c index 12374e87..bd8b57a8 100644 --- a/src/wireless-security/eap-method-tls.c +++ b/src/wireless-security/eap-method-tls.c @@ -22,11 +22,8 @@ struct _EAPMethodTLS { EAPMethod parent; -#if LIBNM_BUILD -/* libnm-glib doesn't support these. */ const char *ca_cert_password_flags_name; const char *client_cert_password_flags_name; -#endif const char *client_key_password_flags_name; gboolean editing_connection; @@ -116,13 +113,11 @@ fill_connection (EAPMethod *parent, NMConnection *connection) g_assert (widget); g_object_set (s_8021x, NM_SETTING_802_1X_IDENTITY, gtk_entry_get_text (GTK_ENTRY (widget)), NULL); -#if LIBNM_BUILD widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_domain_entry")); g_assert (widget); g_object_set (s_8021x, parent->phase2 ? NM_SETTING_802_1X_PHASE2_DOMAIN_SUFFIX_MATCH : NM_SETTING_802_1X_DOMAIN_SUFFIX_MATCH, gtk_entry_get_text (GTK_ENTRY (widget)), NULL); -#endif /* TLS private key */ password = nma_cert_chooser_get_key_password (NMA_CERT_CHOOSER (method->client_cert_chooser)); @@ -141,8 +136,6 @@ fill_connection (EAPMethod *parent, NMConnection *connection) } g_free (value); -#if LIBNM_BUILD -/* libnm-glib doesn't support these. */ /* Save CA certificate PIN and its flags to the connection */ secret_flags = nma_cert_chooser_get_cert_password_flags (NMA_CERT_CHOOSER (method->ca_cert_chooser)); nm_setting_set_secret_flags (NM_SETTING (s_8021x), method->ca_cert_password_flags_name, @@ -169,7 +162,6 @@ fill_connection (EAPMethod *parent, NMConnection *connection) nma_cert_chooser_get_cert_password (NMA_CERT_CHOOSER (method->client_cert_chooser)), NULL); } -#endif /* Save user private key password flags to the connection */ secret_flags = nma_cert_chooser_get_key_password_flags (NMA_CERT_CHOOSER (method->client_cert_chooser)); @@ -366,15 +358,12 @@ eap_method_tls_new (WirelessSecurity *ws_parent, return NULL; method = (EAPMethodTLS *) parent; -#if LIBNM_BUILD -/* libnm-glib doesn't support these. */ method->ca_cert_password_flags_name = phase2 ? NM_SETTING_802_1X_PHASE2_CA_CERT_PASSWORD : NM_SETTING_802_1X_CA_CERT_PASSWORD; method->client_cert_password_flags_name = phase2 ? NM_SETTING_802_1X_PHASE2_CLIENT_CERT_PASSWORD : NM_SETTING_802_1X_CLIENT_CERT_PASSWORD; -#endif method->client_key_password_flags_name = phase2 ? NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD : NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD; @@ -402,7 +391,6 @@ eap_method_tls_new (WirelessSecurity *ws_parent, widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_domain_entry")); g_assert (widget); -#if LIBNM_BUILD g_signal_connect (G_OBJECT (widget), "changed", (GCallback) wireless_security_changed_cb, ws_parent); @@ -413,11 +401,6 @@ eap_method_tls_new (WirelessSecurity *ws_parent, if (s_8021x && nm_setting_802_1x_get_domain_suffix_match (s_8021x)) gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_802_1x_get_domain_suffix_match (s_8021x)); } -#else - gtk_widget_hide (widget); - widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_domain_label")); - gtk_widget_hide (widget); -#endif widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_grid")); g_assert (widget); @@ -500,15 +483,12 @@ eap_method_tls_new (WirelessSecurity *ws_parent, gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), ca_not_required); /* Create password-storage popup menus for password entries under their secondary icon */ -#if LIBNM_BUILD -/* libnm-glib doesn't support these. */ nma_cert_chooser_setup_cert_password_storage (NMA_CERT_CHOOSER (method->ca_cert_chooser), 0, (NMSetting *) s_8021x, method->ca_cert_password_flags_name, FALSE, secrets_only); nma_cert_chooser_setup_cert_password_storage (NMA_CERT_CHOOSER (method->client_cert_chooser), 0, (NMSetting *) s_8021x, method->client_cert_password_flags_name, FALSE, secrets_only); -#endif nma_cert_chooser_setup_key_password_storage (NMA_CERT_CHOOSER (method->client_cert_chooser), 0, (NMSetting *) s_8021x, method->client_key_password_flags_name, FALSE, secrets_only); diff --git a/src/wireless-security/eap-method-ttls.c b/src/wireless-security/eap-method-ttls.c index c94a9deb..1cad3a53 100644 --- a/src/wireless-security/eap-method-ttls.c +++ b/src/wireless-security/eap-method-ttls.c @@ -118,9 +118,7 @@ fill_connection (EAPMethod *parent, NMConnection *connection) EAPMethodTTLS *method = (EAPMethodTTLS *) parent; NMSetting8021x *s_8021x; NMSetting8021xCKFormat format = NM_SETTING_802_1X_CK_FORMAT_UNKNOWN; -#if LIBNM_BUILD NMSettingSecretFlags secret_flags; -#endif GtkWidget *widget; const char *text; char *value = NULL; @@ -142,16 +140,12 @@ fill_connection (EAPMethod *parent, NMConnection *connection) if (text && strlen (text)) g_object_set (s_8021x, NM_SETTING_802_1X_ANONYMOUS_IDENTITY, text, NULL); -#if LIBNM_BUILD widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_domain_entry")); g_assert (widget); text = gtk_entry_get_text (GTK_ENTRY (widget)); if (text && strlen (text)) g_object_set (s_8021x, NM_SETTING_802_1X_DOMAIN_SUFFIX_MATCH, text, NULL); -#endif -#if LIBNM_BUILD -/* libnm-glib doesn't support this. */ /* Save CA certificate PIN and its flags to the connection */ secret_flags = nma_cert_chooser_get_cert_password_flags (NMA_CERT_CHOOSER (method->ca_cert_chooser)); nm_setting_set_secret_flags (NM_SETTING (s_8021x), NM_SETTING_802_1X_CA_CERT_PASSWORD, @@ -165,7 +159,6 @@ fill_connection (EAPMethod *parent, NMConnection *connection) nma_cert_chooser_get_cert_password (NMA_CERT_CHOOSER (method->ca_cert_chooser)), NULL); } -#endif /* TLS CA certificate */ if (gtk_widget_get_sensitive (method->ca_cert_chooser)) @@ -493,17 +486,11 @@ eap_method_ttls_new (WirelessSecurity *ws_parent, ws_parent); widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_domain_entry")); -#if LIBNM_BUILD if (s_8021x && nm_setting_802_1x_get_domain_suffix_match (s_8021x)) gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_802_1x_get_domain_suffix_match (s_8021x)); g_signal_connect (G_OBJECT (widget), "changed", (GCallback) wireless_security_changed_cb, ws_parent); -#else - gtk_widget_hide (widget); - widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_domain_label")); - gtk_widget_hide (widget); -#endif widget = inner_auth_combo_init (method, connection, s_8021x, secrets_only); inner_auth_combo_changed_cb (widget, (gpointer) method); @@ -525,11 +512,9 @@ eap_method_ttls_new (WirelessSecurity *ws_parent, gtk_widget_hide (widget); } -#if LIBNM_BUILD nma_cert_chooser_setup_cert_password_storage (NMA_CERT_CHOOSER (method->ca_cert_chooser), 0, (NMSetting *) s_8021x, NM_SETTING_802_1X_CA_CERT_PASSWORD, FALSE, secrets_only); -#endif return method; } diff --git a/src/wireless-security/eap-method.c b/src/wireless-security/eap-method.c index 8e774e10..b7c1a82e 100644 --- a/src/wireless-security/eap-method.c +++ b/src/wireless-security/eap-method.c @@ -386,15 +386,12 @@ eap_method_setup_cert_chooser (NMACertChooser *cert_chooser, case NM_SETTING_802_1X_CK_SCHEME_PATH: value = cert_path_func (s_8021x); break; -#if LIBNM_BUILD -/* Not available in libnm-glib */ case NM_SETTING_802_1X_CK_SCHEME_PKCS11: value = cert_uri_func (s_8021x); password = cert_password_func ? cert_password_func (s_8021x) : NULL; if (password) nma_cert_chooser_set_cert_password (cert_chooser, password); break; -#endif case NM_SETTING_802_1X_CK_SCHEME_UNKNOWN: /* No CA set. */ break; @@ -411,12 +408,9 @@ eap_method_setup_cert_chooser (NMACertChooser *cert_chooser, case NM_SETTING_802_1X_CK_SCHEME_PATH: value = key_path_func (s_8021x); break; -#if LIBNM_BUILD -/* Not available in libnm-glib */ case NM_SETTING_802_1X_CK_SCHEME_PKCS11: value = key_uri_func (s_8021x); break; -#endif case NM_SETTING_802_1X_CK_SCHEME_UNKNOWN: /* No certificate set. */ break; diff --git a/src/wireless-security/eap-method.h b/src/wireless-security/eap-method.h index 24f8ef38..ed9e1ac8 100644 --- a/src/wireless-security/eap-method.h +++ b/src/wireless-security/eap-method.h @@ -93,20 +93,6 @@ void eap_method_ca_cert_ignore_load (NMConnection *connection); GError *eap_method_ca_cert_validate_cb (NMACertChooser *cert_chooser, gpointer user_data); -#if !LIBNM_BUILD -/* For mere convenience. These are not available in libnm-glib. */ -#define nm_setting_802_1x_get_ca_cert_password NULL -#define nm_setting_802_1x_get_ca_cert_uri NULL -#define nm_setting_802_1x_get_client_cert_password NULL -#define nm_setting_802_1x_get_client_cert_uri NULL -#define nm_setting_802_1x_get_private_key_uri NULL -#define nm_setting_802_1x_get_phase2_ca_cert_password NULL -#define nm_setting_802_1x_get_phase2_ca_cert_uri NULL -#define nm_setting_802_1x_get_phase2_client_cert_password NULL -#define nm_setting_802_1x_get_phase2_client_cert_uri NULL -#define nm_setting_802_1x_get_phase2_private_key_uri NULL -#endif - void eap_method_setup_cert_chooser (NMACertChooser *cert_chooser, NMSetting8021x *s_8021x, NMSetting8021xCKScheme (*cert_scheme_func) (NMSetting8021x *setting), |