[network-manager-applet] peap: add GTC as a recognized phase2 method (bgo #565065) (rh #451027) (lp #284211)



commit 272cf183c7963dfaf019b2f5afc816c0bd2dfd73
Author: Dan Williams <dcbw redhat com>
Date:   Wed Jul 29 14:19:28 2009 -0400

    peap: add GTC as a recognized phase2 method (bgo #565065) (rh #451027) (lp #284211)

 src/wireless-security/eap-method-peap.c   |   16 ++++++++++++++++
 src/wireless-security/eap-method-simple.c |    3 +++
 src/wireless-security/eap-method-simple.h |    1 +
 3 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/wireless-security/eap-method-peap.c b/src/wireless-security/eap-method-peap.c
index f0cacef..8eee286 100644
--- a/src/wireless-security/eap-method-peap.c
+++ b/src/wireless-security/eap-method-peap.c
@@ -218,6 +218,7 @@ inner_auth_combo_init (EAPMethodPEAP *method,
 	GtkTreeIter iter;
 	EAPMethodSimple *em_mschap_v2;
 	EAPMethodSimple *em_md5;
+	EAPMethodSimple *em_gtc;
 	guint32 active = 0;
 	const char *phase2_auth = NULL;
 
@@ -260,6 +261,21 @@ inner_auth_combo_init (EAPMethodPEAP *method,
 	if (phase2_auth && !strcasecmp (phase2_auth, "md5"))
 		active = 1;
 
+	em_gtc = eap_method_simple_new (glade_file,
+	                                method->sec_parent,
+	                                connection,
+	                                EAP_METHOD_SIMPLE_TYPE_GTC);
+	gtk_list_store_append (auth_model, &iter);
+	gtk_list_store_set (auth_model, &iter,
+	                    I_NAME_COLUMN, _("GTC"),
+	                    I_METHOD_COLUMN, em_gtc,
+	                    -1);
+	eap_method_unref (EAP_METHOD (em_gtc));
+
+	/* Check for defaulting to GTC */
+	if (phase2_auth && !strcasecmp (phase2_auth, "gtc"))
+		active = 2;
+
 	combo = glade_xml_get_widget (xml, "eap_peap_inner_auth_combo");
 	g_assert (combo);
 
diff --git a/src/wireless-security/eap-method-simple.c b/src/wireless-security/eap-method-simple.c
index 8f4b2e3..169d487 100644
--- a/src/wireless-security/eap-method-simple.c
+++ b/src/wireless-security/eap-method-simple.c
@@ -111,6 +111,9 @@ fill_connection (EAPMethod *parent, NMConnection *connection)
 		case EAP_METHOD_SIMPLE_TYPE_CHAP:
 			g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, "chap", NULL);
 			break;
+		case EAP_METHOD_SIMPLE_TYPE_GTC:
+			g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, "gtc", NULL);
+			break;
 		default:
 			g_assert_not_reached ();
 			break;
diff --git a/src/wireless-security/eap-method-simple.h b/src/wireless-security/eap-method-simple.h
index 410a532..0069d43 100644
--- a/src/wireless-security/eap-method-simple.h
+++ b/src/wireless-security/eap-method-simple.h
@@ -30,6 +30,7 @@ typedef enum {
 	EAP_METHOD_SIMPLE_TYPE_MSCHAP_V2,
 	EAP_METHOD_SIMPLE_TYPE_MD5,
 	EAP_METHOD_SIMPLE_TYPE_CHAP,
+	EAP_METHOD_SIMPLE_TYPE_GTC
 } EAPMethodSimpleType;
 
 typedef struct {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]