From e77bfe7fed7bfc73e8fb83ab964b5cf36127dfba Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 18 Sep 2013 19:17:34 +0100 Subject: [PATCH] Implementation of EAP-PWD support --- cli/src/settings.c | 2 +- libnm-util/nm-setting-8021x.c | 7 ++++--- src/settings/plugins/ifcfg-rh/reader.c | 1 + src/settings/plugins/ifnet/connection_parser.c | 1 + src/supplicant-manager/nm-supplicant-settings-verify.c | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cli/src/settings.c b/cli/src/settings.c index 81e8779..1b75082 100644 --- a/cli/src/settings.c +++ b/cli/src/settings.c @@ -2302,7 +2302,7 @@ DEFINE_SETTER_STR_LIST_MULTI (check_and_add_802_1X_eap, static gboolean nmc_property_802_1X_set_eap (NMSetting *setting, const char *prop, const char *val, GError **error) { - const char *valid_eap[] = { "leap", "md5", "tls", "peap", "ttls", "sim", "fast", NULL }; + const char *valid_eap[] = { "leap", "md5", "tls", "peap", "ttls", "sim", "fast", "pwd", NULL }; return check_and_add_802_1X_eap (setting, prop, val, valid_eap, error); } DEFINE_REMOVER_INDEX (nmc_property_802_1X_remove_idx_eap, diff --git a/libnm-util/nm-setting-8021x.c b/libnm-util/nm-setting-8021x.c index 58b2a44..55644e0 100644 --- a/libnm-util/nm-setting-8021x.c +++ b/libnm-util/nm-setting-8021x.c @@ -2395,6 +2395,7 @@ typedef struct { static EAPMethodsTable eap_methods_table[] = { { "leap", need_secrets_password, verify_identity }, + { "pwd", need_secrets_password, verify_identity }, { "md5", need_secrets_password, verify_identity }, { "pap", need_secrets_password, verify_identity }, { "chap", need_secrets_password, verify_identity }, @@ -2520,7 +2521,7 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) { NMSetting8021x *self = NM_SETTING_802_1X (setting); NMSetting8021xPrivate *priv = NM_SETTING_802_1X_GET_PRIVATE (self); - const char *valid_eap[] = { "leap", "md5", "tls", "peap", "ttls", "sim", "fast", NULL }; + const char *valid_eap[] = { "leap", "md5", "tls", "peap", "ttls", "sim", "fast", "pwd", NULL }; const char *valid_phase1_peapver[] = { "0", "1", NULL }; const char *valid_phase1_peaplabel[] = { "0", "1", NULL }; const char *valid_phase1_fast_pac[] = { "0", "1", "2", "3", NULL }; @@ -3024,7 +3025,7 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class) * NMSetting8021x:eap: * * The allowed EAP method to be used when authenticating to the network with - * 802.1x. Valid methods are: "leap", "md5", "tls", "peap", "ttls", and + * 802.1x. Valid methods are: "leap", "md5", "tls", "peap", "ttls", "pwd" and * "fast". Each method requires different configuration using the * properties of this object; refer to wpa_supplicant documentation for the * allowed combinations. @@ -3036,7 +3037,7 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class) "The allowed EAP method to be used when " "authenticating to the network with 802.1x. " "Valid methods are: 'leap', 'md5', 'tls', 'peap', " - "'ttls', and 'fast'. Each method requires " + "'ttls', 'pwd', and 'fast'. Each method requires " "different configuration using the properties of " "this setting; refer to wpa_supplicant " "documentation for the allowed combinations.", diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c index 6b0c693..5c34536 100644 --- a/src/settings/plugins/ifcfg-rh/reader.c +++ b/src/settings/plugins/ifcfg-rh/reader.c @@ -2713,6 +2713,7 @@ static EAPReader eap_readers[] = { { "mschap", eap_simple_reader, TRUE }, { "mschapv2", eap_simple_reader, TRUE }, { "leap", eap_simple_reader, FALSE }, + { "pwd", eap_simple_reader, FALSE }, { "tls", eap_tls_reader, FALSE }, { "peap", eap_peap_reader, FALSE }, { "ttls", eap_ttls_reader, FALSE }, diff --git a/src/settings/plugins/ifnet/connection_parser.c b/src/settings/plugins/ifnet/connection_parser.c index 9f389ae..72f4fdb 100644 --- a/src/settings/plugins/ifnet/connection_parser.c +++ b/src/settings/plugins/ifnet/connection_parser.c @@ -98,6 +98,7 @@ typedef struct { static EAPReader eap_readers[] = { {"md5", eap_simple_reader, TRUE}, + {"pwd", eap_simple_reader, TRUE}, {"pap", eap_simple_reader, TRUE}, {"chap", eap_simple_reader, TRUE}, {"mschap", eap_simple_reader, TRUE}, diff --git a/src/supplicant-manager/nm-supplicant-settings-verify.c b/src/supplicant-manager/nm-supplicant-settings-verify.c index 143e51a..6e6d7a9 100644 --- a/src/supplicant-manager/nm-supplicant-settings-verify.c +++ b/src/supplicant-manager/nm-supplicant-settings-verify.c @@ -74,7 +74,7 @@ const char * key_mgmt_allowed[] = { "WPA-PSK", "WPA-EAP", "IEEE8021X", "WPA-NONE "NONE", NULL }; const char * auth_alg_allowed[] = { "OPEN", "SHARED", "LEAP", NULL }; const char * eap_allowed[] = { "LEAP", "MD5", "TLS", "PEAP", "TTLS", "SIM", - "PSK", "FAST", NULL }; + "PSK", "FAST", "PWD", NULL }; const char * phase1_allowed[] = {"peapver=0", "peapver=1", "peaplabel=1", "peap_outer_success=0", "include_tls_length=1", -- 1.8.3.2