mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 15:50:36 +01:00
libnm-util: add 'pac-file' property for 8021x setting (used in EAP-FAST)
This commit is contained in:
parent
e281d09805
commit
0ba66f8272
3 changed files with 44 additions and 2 deletions
|
|
@ -122,6 +122,7 @@ global:
|
|||
nm_setting_802_1x_get_num_altsubject_matches;
|
||||
nm_setting_802_1x_get_num_eap_methods;
|
||||
nm_setting_802_1x_get_num_phase2_altsubject_matches;
|
||||
nm_setting_802_1x_get_pac_file;
|
||||
nm_setting_802_1x_get_password;
|
||||
nm_setting_802_1x_get_password_flags;
|
||||
nm_setting_802_1x_get_password_raw;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
@ -344,6 +346,22 @@ nm_setting_802_1x_get_anonymous_identity (NMSetting8021x *setting)
|
|||
return NM_SETTING_802_1X_GET_PRIVATE (setting)->anonymous_identity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
|
@ -2974,6 +2999,19 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class)
|
|||
NULL,
|
||||
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:
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
||||
|
|
@ -101,6 +101,7 @@ GQuark nm_setting_802_1x_error_quark (void);
|
|||
#define NM_SETTING_802_1X_EAP "eap"
|
||||
#define NM_SETTING_802_1X_IDENTITY "identity"
|
||||
#define NM_SETTING_802_1X_ANONYMOUS_IDENTITY "anonymous-identity"
|
||||
#define NM_SETTING_802_1X_PAC_FILE "pac-file"
|
||||
#define NM_SETTING_802_1X_CA_CERT "ca-cert"
|
||||
#define NM_SETTING_802_1X_CA_PATH "ca-path"
|
||||
#define NM_SETTING_802_1X_SUBJECT_MATCH "subject-match"
|
||||
|
|
@ -178,6 +179,8 @@ const char * nm_setting_802_1x_get_identity (NMSetting8
|
|||
|
||||
const char * nm_setting_802_1x_get_anonymous_identity (NMSetting8021x *setting);
|
||||
|
||||
const char * nm_setting_802_1x_get_pac_file (NMSetting8021x *setting);
|
||||
|
||||
gboolean nm_setting_802_1x_get_system_ca_certs (NMSetting8021x *setting);
|
||||
const char * nm_setting_802_1x_get_ca_path (NMSetting8021x *setting);
|
||||
const char * nm_setting_802_1x_get_phase2_ca_path (NMSetting8021x *setting);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue