diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2013-03-26 13:17:27 +0100 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2013-03-26 16:49:37 +0100 |
commit | dc58072f7b941cf9c689919dc14e7a57784d3395 (patch) | |
tree | 7cd9c3bf8f975920db6feb0117dfd134cc837bb1 /libnm-util/nm-setting-8021x.c | |
parent | e8cbde2704d4e466c87405ccdc58567d8a012438 (diff) | |
download | NetworkManager-dc58072f7b941cf9c689919dc14e7a57784d3395.tar.gz |
libnm-util: install :pin and :pin-flags as properties for NMSetting8021x
GLib-GObject-WARNING **: g_object_get_property: object class `NMSetting8021x' has no property named `pin'
GLib-GObject-WARNING **: g_object_get_property: object class `NMSetting8021x' has no property named `pin-flags'
Diffstat (limited to 'libnm-util/nm-setting-8021x.c')
-rw-r--r-- | libnm-util/nm-setting-8021x.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/libnm-util/nm-setting-8021x.c b/libnm-util/nm-setting-8021x.c index e4372445b9..ebf957a9e4 100644 --- a/libnm-util/nm-setting-8021x.c +++ b/libnm-util/nm-setting-8021x.c @@ -2612,6 +2612,7 @@ finalize (GObject *object) g_free (priv->password); if (priv->password_raw) g_byte_array_free (priv->password_raw, TRUE); + g_free (priv->pin); nm_utils_slist_free (priv->eap, g_free); nm_utils_slist_free (priv->altsubject_matches, g_free); @@ -2823,6 +2824,13 @@ set_property (GObject *object, guint prop_id, case PROP_PHASE2_PRIVATE_KEY_PASSWORD_FLAGS: priv->phase2_private_key_password_flags = g_value_get_uint (value); break; + case PROP_PIN: + g_free (priv->pin); + priv->pin = g_value_dup_string (value); + break; + case PROP_PIN_FLAGS: + priv->pin_flags = g_value_get_uint (value); + break; case PROP_SYSTEM_CA_CERTS: priv->system_ca_certs = g_value_get_boolean (value); break; @@ -2927,6 +2935,12 @@ get_property (GObject *object, guint prop_id, case PROP_PHASE2_PRIVATE_KEY_PASSWORD_FLAGS: g_value_set_uint (value, priv->phase2_private_key_password_flags); break; + case PROP_PIN: + g_value_set_string (value, priv->pin); + break; + case PROP_PIN_FLAGS: + g_value_set_uint (value, priv->pin_flags); + break; case PROP_SYSTEM_CA_CERTS: g_value_set_boolean (value, priv->system_ca_certs); break; @@ -3591,6 +3605,33 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class) G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); /** + * NMSetting8021x:pin: + * + * PIN used for EAP authentication methods. + **/ + g_object_class_install_property + (object_class, PROP_PIN, + g_param_spec_string (NM_SETTING_802_1X_PIN, + "PIN", + "PIN used for EAP authentication methods.", + NULL, + G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_SECRET)); + + /** + * NMSetting8021x:pin-flags: + * + * Flags indicating how to handle #NMSetting8021x:pin:. + **/ + g_object_class_install_property (object_class, PROP_PIN_FLAGS, + g_param_spec_uint (NM_SETTING_802_1X_PIN_FLAGS, + "PIN Flags", + "Flags indicating how to handle the 802.1x PIN.", + NM_SETTING_SECRET_FLAG_NONE, + NM_SETTING_SECRET_FLAGS_ALL, + NM_SETTING_SECRET_FLAG_NONE, + G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); + + /** * NMSetting8021x:system-ca-certs: * * When TRUE, overrides #NMSetting8021x:ca-path and |