2006-06-15 Robert Love <rml@novell.com>

* gnome/applet/nm-gconf-wso-wpa-eap.c: Don't set the Gconf keys unless
	  we have a value to set.  Gconf generates a warning if `val' is NULL.
	* src/nm-ap-security-wpa-eap.c: Don't set the key for an Enterprise AP
	  unless we actually received a valid private key file passphrase or
	  password.  Otherwise, we don't know to later ask the applet to pull
	  the key from the keyring.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1845 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Robert Love
2006-06-19 17:43:18 +00:00
committed by Robert Love
parent 20672fb3a8
commit 2f83566a03
3 changed files with 49 additions and 21 deletions

View File

@@ -1,3 +1,12 @@
2006-06-15 Robert Love <rml@novell.com>
* gnome/applet/nm-gconf-wso-wpa-eap.c: Don't set the Gconf keys unless
we have a value to set. Gconf generates a warning if `val' is NULL.
* src/nm-ap-security-wpa-eap.c: Don't set the key for an Enterprise AP
unless we actually received a valid private key file passphrase or
password. Otherwise, we don't know to later ask the applet to pull
the key from the keyring.
2006-06-17 Dan Williams <dcbw@redhat.com> 2006-06-17 Dan Williams <dcbw@redhat.com>
* libnm-util/dbus-dict-helpers.[ch] * libnm-util/dbus-dict-helpers.[ch]
@@ -26,7 +35,7 @@
2006-06-15 Robert Love <rml@novell.com> 2006-06-15 Robert Love <rml@novell.com>
* gnome/applet/nm-gconf-wso-wpa-eap.c: Don't set the set unless there * gnome/applet/nm-gconf-wso-wpa-eap.c: Don't set the key unless there
is a non-empty key to set. Elsewhere, pass an empty string via DBUS is a non-empty key to set. Elsewhere, pass an empty string via DBUS
if there is no key to pass. if there is no key to pass.
* libnm-util/dbus-helpers.c: Given the above, we can trust always * libnm-util/dbus-helpers.c: Given the above, we can trust always

View File

@@ -239,31 +239,49 @@ real_serialize_gconf (NMGConfWSO *instance, GConfClient *client, const char *net
key = g_strdup_printf ("%s/%s/%skey_mgt", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX); key = g_strdup_printf ("%s/%s/%skey_mgt", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX);
gconf_client_set_int (client, key, self->priv->key_mgmt, NULL); gconf_client_set_int (client, key, self->priv->key_mgmt, NULL);
g_free (key);
key = g_strdup_printf ("%s/%s/%sidentity", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX);
gconf_client_set_string (client, key, self->priv->identity, NULL);
g_free (key); g_free (key);
key = g_strdup_printf ("%s/%s/%spasswd", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX); if (self->priv->identity && strlen (self->priv->identity) > 0)
gconf_client_set_string (client, key, self->priv->passwd, NULL); {
g_free (key); key = g_strdup_printf ("%s/%s/%sidentity", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX);
gconf_client_set_string (client, key, self->priv->identity, NULL);
g_free (key);
}
key = g_strdup_printf ("%s/%s/%sanon_identity", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX); if (self->priv->passwd && strlen (self->priv->passwd) > 0)
gconf_client_set_string (client, key, self->priv->anon_identity, NULL); {
g_free (key); key = g_strdup_printf ("%s/%s/%spasswd", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX);
gconf_client_set_string (client, key, self->priv->passwd, NULL);
g_free (key);
}
key = g_strdup_printf ("%s/%s/%sprivate_key_file", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX); if (self->priv->anon_identity && strlen (self->priv->anon_identity) > 0)
gconf_client_set_string (client, key, self->priv->private_key_file, NULL); {
g_free (key); key = g_strdup_printf ("%s/%s/%sanon_identity", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX);
gconf_client_set_string (client, key, self->priv->anon_identity, NULL);
g_free (key);
}
key = g_strdup_printf ("%s/%s/%sclient_cert_file", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX); if (self->priv->private_key_file && strlen (self->priv->private_key_file) > 0)
gconf_client_set_string (client, key, self->priv->client_cert_file, NULL); {
g_free (key); key = g_strdup_printf ("%s/%s/%sprivate_key_file", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX);
gconf_client_set_string (client, key, self->priv->private_key_file, NULL);
g_free (key);
}
key = g_strdup_printf ("%s/%s/%sca_cert_file", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX); if (self->priv->client_cert_file && strlen (self->priv->client_cert_file) > 0)
gconf_client_set_string (client, key, self->priv->ca_cert_file, NULL); {
g_free (key); key = g_strdup_printf ("%s/%s/%sclient_cert_file", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX);
gconf_client_set_string (client, key, self->priv->client_cert_file, NULL);
g_free (key);
}
if (self->priv->ca_cert_file && strlen (self->priv->ca_cert_file) > 0)
{
key = g_strdup_printf ("%s/%s/%sca_cert_file", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX);
gconf_client_set_string (client, key, self->priv->ca_cert_file, NULL);
g_free (key);
}
return TRUE; return TRUE;
} }

View File

@@ -75,7 +75,8 @@ nm_ap_security_wpa_eap_new_deserialize (DBusMessageIter *iter)
/* Success, build up our security object */ /* Success, build up our security object */
security = g_object_new (NM_TYPE_AP_SECURITY_WPA_EAP, NULL); security = g_object_new (NM_TYPE_AP_SECURITY_WPA_EAP, NULL);
nm_ap_security_set_we_cipher (NM_AP_SECURITY (security), NM_AUTH_TYPE_WPA_EAP); nm_ap_security_set_we_cipher (NM_AP_SECURITY (security), NM_AUTH_TYPE_WPA_EAP);
nm_ap_security_set_key (NM_AP_SECURITY (security), "FIXME", 5); /* FIXME: what do we do for Enterprise? */ if ((private_key_passwd && strlen (private_key_passwd) > 0) || (passwd && strlen (passwd) > 0))
nm_ap_security_set_key (NM_AP_SECURITY (security), "FIXME", 5);
security->priv->eap_method = eap_method; security->priv->eap_method = eap_method;
security->priv->key_type = key_type; security->priv->key_type = key_type;
security->priv->wpa_version = wpa_version; security->priv->wpa_version = wpa_version;