summaryrefslogtreecommitdiff
path: root/libnm-util/nm-setting-8021x.c
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2012-01-20 15:10:30 +0100
committerJiří Klimeš <jklimes@redhat.com>2012-01-27 11:46:36 +0100
commit0ba66f8272ab34f845c3d1218958ecfa43715033 (patch)
treead63589f32beafc5828179a1a76ea56b355acbef /libnm-util/nm-setting-8021x.c
parente281d0980518e6c134c46831363da3964714a2a0 (diff)
downloadNetworkManager-0ba66f8272ab34f845c3d1218958ecfa43715033.tar.gz
libnm-util: add 'pac-file' property for 8021x setting (used in EAP-FAST)
Diffstat (limited to 'libnm-util/nm-setting-8021x.c')
-rw-r--r--libnm-util/nm-setting-8021x.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/libnm-util/nm-setting-8021x.c b/libnm-util/nm-setting-8021x.c
index d9735d238b..3d745c0689 100644
--- a/libnm-util/nm-setting-8021x.c
+++ b/libnm-util/nm-setting-8021x.c
@@ -19,7 +19,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2007 - 2011 Red Hat, Inc.
+ * (C) Copyright 2007 - 2012 Red Hat, Inc.
* (C) Copyright 2007 - 2008 Novell, Inc.
*/
@@ -114,6 +114,7 @@ typedef struct {
GSList *eap; /* GSList of strings */
char *identity;
char *anonymous_identity;
+ char *pac_file;
GByteArray *ca_cert;
char *ca_path;
char *subject_match;
@@ -149,6 +150,7 @@ enum {
PROP_EAP,
PROP_IDENTITY,
PROP_ANONYMOUS_IDENTITY,
+ PROP_PAC_FILE,
PROP_CA_CERT,
PROP_CA_PATH,
PROP_SUBJECT_MATCH,
@@ -345,6 +347,22 @@ nm_setting_802_1x_get_anonymous_identity (NMSetting8021x *setting)
}
/**
+ * nm_setting_802_1x_get_pac_file:
+ * @setting: the #NMSetting8021x
+ *
+ * Returns the file containing PAC credentials used by EAP-FAST method.
+ *
+ * Returns: the PAC file
+ **/
+const char *
+nm_setting_802_1x_get_pac_file (NMSetting8021x *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), NULL);
+
+ return NM_SETTING_802_1X_GET_PRIVATE (setting)->pac_file;
+}
+
+/**
* nm_setting_802_1x_get_ca_path:
* @setting: the #NMSetting8021x
*
@@ -2644,6 +2662,10 @@ set_property (GObject *object, guint prop_id,
g_free (priv->anonymous_identity);
priv->anonymous_identity = g_value_dup_string (value);
break;
+ case PROP_PAC_FILE:
+ g_free (priv->pac_file);
+ priv->pac_file = g_value_dup_string (value);
+ break;
case PROP_CA_CERT:
if (priv->ca_cert) {
g_byte_array_free (priv->ca_cert, TRUE);
@@ -2815,6 +2837,9 @@ get_property (GObject *object, guint prop_id,
case PROP_ANONYMOUS_IDENTITY:
g_value_set_string (value, priv->anonymous_identity);
break;
+ case PROP_PAC_FILE:
+ g_value_set_string (value, priv->pac_file);
+ break;
case PROP_CA_CERT:
g_value_set_boxed (value, priv->ca_cert);
break;
@@ -2975,6 +3000,19 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class)
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
/**
+ * NMSetting8021x:pac-file:
+ *
+ * UTF-8 encoded file path containing PAC for EAP-FAST.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_PAC_FILE,
+ g_param_spec_string (NM_SETTING_802_1X_PAC_FILE,
+ "PAC file",
+ "UTF-8 encoded file path containing PAC for EAP-FAST.",
+ NULL,
+ G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
+
+ /**
* NMSetting8021x:ca-cert:
*
* Contains the CA certificate if used by the EAP method specified in the