diff options
author | Thomas Haller <thaller@redhat.com> | 2013-10-07 17:47:04 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2013-10-29 20:46:04 +0100 |
commit | b6dbe295b15fadece5afe99e24755d336fc1ea52 (patch) | |
tree | 072ea01b5b29b8b92e4c0644e086f79724f12e19 | |
parent | 2260634f4bf4e58b7e88b5407e25b3404c1fdf0d (diff) | |
download | network-manager-applet-b6dbe295b15fadece5afe99e24755d336fc1ea52.tar.gz |
applet: remove wrong assert in eap_method_ca_cert_not_required_toggled
With the previous commit, the "Connect" button in the "Connect to Hidden
Network" is disabled, if the EAP connection does not validate.
Before, the user was able to click on the "Connect" button and the
assert in eap_method_ca_cert_not_required_toggled failed.
Still, the assert is too strict, so remove it.
Also fix an invalid warning in eap-method-tls.c
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | src/wireless-security/eap-method-peap.c | 2 | ||||
-rw-r--r-- | src/wireless-security/eap-method-tls.c | 4 | ||||
-rw-r--r-- | src/wireless-security/eap-method-ttls.c | 2 | ||||
-rw-r--r-- | src/wireless-security/eap-method.c | 10 | ||||
-rw-r--r-- | src/wireless-security/eap-method.h | 3 |
5 files changed, 6 insertions, 15 deletions
diff --git a/src/wireless-security/eap-method-peap.c b/src/wireless-security/eap-method-peap.c index f8ef35bb..932ae25d 100644 --- a/src/wireless-security/eap-method-peap.c +++ b/src/wireless-security/eap-method-peap.c @@ -164,7 +164,7 @@ fill_connection (EAPMethod *parent, NMConnection *connection) g_clear_error (&error); ca_cert_error = TRUE; } - eap_method_ca_cert_ignore_set (parent, connection, filename, ca_cert_error, "eap_peap_ca_cert_not_required_checkbox"); + eap_method_ca_cert_ignore_set (parent, connection, filename, ca_cert_error); g_free (filename); widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_version_combo")); diff --git a/src/wireless-security/eap-method-tls.c b/src/wireless-security/eap-method-tls.c index afe8c060..b57d1edd 100644 --- a/src/wireless-security/eap-method-tls.c +++ b/src/wireless-security/eap-method-tls.c @@ -234,7 +234,7 @@ fill_connection (EAPMethod *parent, NMConnection *connection) ca_cert_error = TRUE; } } - eap_method_ca_cert_ignore_set (parent, connection, ca_filename, ca_cert_error, "eap_tls_ca_cert_not_required_checkbox"); + eap_method_ca_cert_ignore_set (parent, connection, ca_filename, ca_cert_error); g_free (ca_filename); } @@ -471,7 +471,7 @@ eap_method_tls_new (WirelessSecurity *ws_parent, phase2 ? nm_setting_802_1x_get_phase2_private_key_path : nm_setting_802_1x_get_private_key_path, TRUE, FALSE); - if (eap_method_ca_cert_ignore_get (parent, connection)) { + if (connection && eap_method_ca_cert_ignore_get (parent, connection)) { widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_ca_cert_button")); ca_not_required = !gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget)); } diff --git a/src/wireless-security/eap-method-ttls.c b/src/wireless-security/eap-method-ttls.c index e8c9e4d2..8d458659 100644 --- a/src/wireless-security/eap-method-ttls.c +++ b/src/wireless-security/eap-method-ttls.c @@ -159,7 +159,7 @@ fill_connection (EAPMethod *parent, NMConnection *connection) g_clear_error (&error); ca_cert_error = TRUE; } - eap_method_ca_cert_ignore_set (parent, connection, filename, ca_cert_error, "eap_ttls_ca_cert_not_required_checkbox"); + eap_method_ca_cert_ignore_set (parent, connection, filename, ca_cert_error); g_free (filename); widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_inner_auth_combo")); diff --git a/src/wireless-security/eap-method.c b/src/wireless-security/eap-method.c index 3f17715c..bdd67d04 100644 --- a/src/wireless-security/eap-method.c +++ b/src/wireless-security/eap-method.c @@ -527,8 +527,6 @@ eap_method_ca_cert_not_required_toggled (GtkBuilder *builder, const char *id_ca_ * @filename: the certificate file, if any * @ca_cert_error: %TRUE if an error was encountered loading the given CA * certificate, %FALSE if not or if a CA certificate is not present - * @id_ca_cert_is_not_required_checkbox: the #GtkWidget object name of the - * "CA certificate not required" checkbox * * Updates the connection's CA cert ignore value to %TRUE if the "CA certificate * not required" checkbox is checked. If @ca_cert_error is %TRUE, then the @@ -540,17 +538,11 @@ void eap_method_ca_cert_ignore_set (EAPMethod *method, NMConnection *connection, const char *filename, - gboolean ca_cert_error, - const char *id_ca_cert_is_not_required_checkbox) + gboolean ca_cert_error) { - GtkWidget *widget; NMSetting8021x *s_8021x; gboolean ignore; - /* We don't really need the checkbox value here. Just assert that it is set as expected. */ - widget = GTK_WIDGET (gtk_builder_get_object (method->builder, id_ca_cert_is_not_required_checkbox)); - g_assert (widget && (ca_cert_error || !filename == gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))); - s_8021x = nm_connection_get_setting_802_1x (connection); if (s_8021x) { ignore = !ca_cert_error && filename == NULL; diff --git a/src/wireless-security/eap-method.h b/src/wireless-security/eap-method.h index 21865843..0dd6c63c 100644 --- a/src/wireless-security/eap-method.h +++ b/src/wireless-security/eap-method.h @@ -124,8 +124,7 @@ void eap_method_ca_cert_not_required_toggled (GtkBuilder *builder, void eap_method_ca_cert_ignore_set (EAPMethod *method, NMConnection *connection, const char *filename, - gboolean ca_cert_error, - const char *id_ca_cert_is_not_required_checkbox); + gboolean ca_cert_error); gboolean eap_method_ca_cert_ignore_get (EAPMethod *method, NMConnection *connection); void eap_method_ca_cert_ignore_save (NMConnection *connection); |