diff options
author | Dan Williams <dcbw@redhat.com> | 2014-05-14 11:26:04 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2014-05-30 14:00:12 -0500 |
commit | 2294732eb608fad0ad65e315e1495094c0c9f34c (patch) | |
tree | 00ec4fbc2699f6eb538a175be7d825b871a73b54 /src/wireless-security/wireless-security.c | |
parent | 4c3d8e7791ad852c6ee5bd0546368d19259d4396 (diff) | |
download | network-manager-applet-2294732eb608fad0ad65e315e1495094c0c9f34c.tar.gz |
libnm-gtk: add support for TTLS/EAP-MD5 and TTLS/EAP-GTC (bgo #729671)
Add the simple EAP methods MD5 and GTC as inner/phase2 methods for TTLS.
These methods must be inner *EAP* methods too, unlike PAP/CHAP/MSCHAP,
so we need to update the code to ensure that when they are selected,
the editor/applet puts them into NM_SETTING_802_1X_PHASE2_AUTHEAP instead
of NM_SETTING_802_1X_PHASE2_AUTH. Take the opportunity to clean up
all the booleans passed into eap_method_simple_new() while we're here
so that we don't have to add yet another boolean argument.
Inspired by a patch from Pali Rohár <pali.rohar@gmail.com>
Diffstat (limited to 'src/wireless-security/wireless-security.c')
-rw-r--r-- | src/wireless-security/wireless-security.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/wireless-security/wireless-security.c b/src/wireless-security/wireless-security.c index d64fe1d0..7e009d54 100644 --- a/src/wireless-security/wireless-security.c +++ b/src/wireless-security/wireless-security.c @@ -382,6 +382,7 @@ ws_802_1x_auth_combo_init (WirelessSecurity *sec, const char *default_method = NULL, *ctype = NULL; int active = -1, item = 0; gboolean wired = FALSE; + EAPMethodSimpleFlags simple_flags = EAP_METHOD_SIMPLE_FLAG_NONE; /* Grab the default EAP method out of the security object */ if (connection) { @@ -405,13 +406,13 @@ ws_802_1x_auth_combo_init (WirelessSecurity *sec, auth_model = gtk_list_store_new (2, G_TYPE_STRING, eap_method_get_type ()); + if (is_editor) + simple_flags |= EAP_METHOD_SIMPLE_FLAG_IS_EDITOR; + if (secrets_only) + simple_flags |= EAP_METHOD_SIMPLE_FLAG_SECRETS_ONLY; + if (wired) { - em_md5 = eap_method_simple_new (sec, - connection, - EAP_METHOD_SIMPLE_TYPE_MD5, - FALSE, - is_editor, - secrets_only); + em_md5 = eap_method_simple_new (sec, connection, EAP_METHOD_SIMPLE_TYPE_MD5, simple_flags); gtk_list_store_append (auth_model, &iter); gtk_list_store_set (auth_model, &iter, AUTH_NAME_COLUMN, _("MD5"), @@ -447,8 +448,7 @@ ws_802_1x_auth_combo_init (WirelessSecurity *sec, item++; } - em_pwd = eap_method_simple_new (sec, connection, EAP_METHOD_SIMPLE_TYPE_PWD, - FALSE, is_editor, secrets_only); + em_pwd = eap_method_simple_new (sec, connection, EAP_METHOD_SIMPLE_TYPE_PWD, simple_flags); gtk_list_store_append (auth_model, &iter); gtk_list_store_set (auth_model, &iter, AUTH_NAME_COLUMN, _("PWD"), |