[PATCH 3/3] supplicant: Incorporate subject_match and altsubject_matches into supplicant config (bgo #341323)
- From: Evan Broder <evan ebroder net>
- To: networkmanager-list gnome org
- Subject: [PATCH 3/3] supplicant: Incorporate subject_match and altsubject_matches into supplicant config (bgo #341323)
- Date: Fri, 29 Jul 2011 12:38:25 -0700
---
src/supplicant-manager/nm-supplicant-config.c | 12 ++++++++++++
.../nm-supplicant-settings-verify.c | 4 ++++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/supplicant-manager/nm-supplicant-config.c b/src/supplicant-manager/nm-supplicant-config.c
index bee163e..c651e0f 100644
--- a/src/supplicant-manager/nm-supplicant-config.c
+++ b/src/supplicant-manager/nm-supplicant-config.c
@@ -864,6 +864,18 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
break;
}
+ /* Subject match */
+ value = nm_setting_802_1x_get_subject_match (setting);
+ if (!add_string_val (self, value, "subject_match", FALSE, FALSE))
+ return FALSE;
+ value = nm_setting_802_1x_get_phase2_subject_match (setting);
+ if (!add_string_val (self, value, "subject_match2", FALSE, FALSE))
+ return FALSE;
+
+ /* altSubjectName match */
+ ADD_STRING_LIST_VAL (setting, 802_1x, altsubject_match, altsubject_matches, "altsubject_match", ';', FALSE, FALSE);
+ ADD_STRING_LIST_VAL (setting, 802_1x, phase2_altsubject_match, phase2_altsubject_matches, "altsubject_match2", ';', FALSE, FALSE);
+
/* Private key */
added = FALSE;
switch (nm_setting_802_1x_get_private_key_scheme (setting)) {
diff --git a/src/supplicant-manager/nm-supplicant-settings-verify.c b/src/supplicant-manager/nm-supplicant-settings-verify.c
index 0372fd9..aea5bfe 100644
--- a/src/supplicant-manager/nm-supplicant-settings-verify.c
+++ b/src/supplicant-manager/nm-supplicant-settings-verify.c
@@ -102,6 +102,8 @@ static const struct Opt opt_table[] = {
{ "identity", TYPE_BYTES, 0, 0, FALSE, NULL },
{ "password", TYPE_BYTES, 0, 0, FALSE, NULL },
{ "ca_path", TYPE_BYTES, 0, 0, FALSE, NULL },
+ { "subject_match", TYPE_BYTES, 0, 0, FALSE, NULL },
+ { "altsubject_match", TYPE_BYTES, 0, 0, FALSE, NULL },
{ "ca_cert", TYPE_BYTES, 0, 65536, FALSE, NULL },
{ "client_cert", TYPE_BYTES, 0, 65536, FALSE, NULL },
{ "private_key", TYPE_BYTES, 0, 65536, FALSE, NULL },
@@ -110,6 +112,8 @@ static const struct Opt opt_table[] = {
{ "phase2", TYPE_KEYWORD, 0, 0, TRUE, phase2_allowed },
{ "anonymous_identity", TYPE_BYTES, 0, 0, FALSE, NULL },
{ "ca_path2", TYPE_BYTES, 0, 0, FALSE, NULL },
+ { "subject_match2", TYPE_BYTES, 0, 0, FALSE, NULL },
+ { "altsubject_match2", TYPE_BYTES, 0, 0, FALSE, NULL },
{ "ca_cert2", TYPE_BYTES, 0, 65536, FALSE, NULL },
{ "client_cert2", TYPE_BYTES, 0, 65536, FALSE, NULL },
{ "private_key2", TYPE_BYTES, 0, 65536, FALSE, NULL },
--
1.7.4.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]