mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-05 12:30:44 +02:00
2006-03-27 Robert Love <rml@novell.com>
Patch by Jon Escombe <list@dresco.co.uk>: * gnome/applet/nm-gconf-wso.c: Add missing NM_AUTH_TYPE_WPA_EAP case. * gnome/applet/nm-gconf-wso-wpa-eap.c: If retrieving the gconf values fail, don't bail out. We don't expect all of the various WPA-EAP values to be present. * src/nm-ap-security.c: We need to match all capabilities for each encryption type, not any one of them. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1640 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
d64140a66d
commit
b3f938f381
4 changed files with 45 additions and 42 deletions
10
ChangeLog
10
ChangeLog
|
|
@ -1,3 +1,13 @@
|
|||
2006-03-27 Robert Love <rml@novell.com>
|
||||
|
||||
Patch by Jon Escombe <list@dresco.co.uk>:
|
||||
* gnome/applet/nm-gconf-wso.c: Add missing NM_AUTH_TYPE_WPA_EAP case.
|
||||
* gnome/applet/nm-gconf-wso-wpa-eap.c: If retrieving the gconf values
|
||||
fail, don't bail out. We don't expect all of the various WPA-EAP
|
||||
values to be present.
|
||||
* src/nm-ap-security.c: We need to match all capabilities for each
|
||||
encryption type, not any one of them.
|
||||
|
||||
2006-03-27 Robert Love <rml@novell.com>
|
||||
|
||||
* src/backends/NetworkManagerSuSE.c: Revert 2006-03-17 commit and again
|
||||
|
|
|
|||
|
|
@ -106,90 +106,80 @@ nm_gconf_wso_wpa_eap_new_deserialize_gconf (GConfClient *client, const char *net
|
|||
char * private_key_file = NULL;
|
||||
char * client_cert_file = NULL;
|
||||
char * ca_cert_file = NULL;
|
||||
int wpa_version;
|
||||
int eap_method;
|
||||
int key_type;
|
||||
int key_mgmt;
|
||||
int wpa_version = 0;
|
||||
int eap_method = 0;
|
||||
int key_type = 0;
|
||||
int key_mgmt = 0;
|
||||
|
||||
g_return_val_if_fail (client != NULL, NULL);
|
||||
g_return_val_if_fail (network != NULL, NULL);
|
||||
g_return_val_if_fail ((we_cipher == NM_AUTH_TYPE_WPA_EAP), NULL);
|
||||
|
||||
if (!nm_gconf_get_int_helper (client,
|
||||
nm_gconf_get_int_helper (client,
|
||||
GCONF_PATH_WIRELESS_NETWORKS,
|
||||
WPA_EAP_PREFIX"eap_method",
|
||||
network,
|
||||
&eap_method))
|
||||
goto out;
|
||||
&eap_method);
|
||||
|
||||
if (!nm_gconf_get_int_helper (client,
|
||||
nm_gconf_get_int_helper (client,
|
||||
GCONF_PATH_WIRELESS_NETWORKS,
|
||||
WPA_EAP_PREFIX"key_type",
|
||||
network,
|
||||
&key_type))
|
||||
goto out;
|
||||
&key_type);
|
||||
|
||||
if (!nm_gconf_get_int_helper (client,
|
||||
nm_gconf_get_int_helper (client,
|
||||
GCONF_PATH_WIRELESS_NETWORKS,
|
||||
WPA_EAP_PREFIX"wpa_version",
|
||||
network,
|
||||
&wpa_version))
|
||||
goto out;
|
||||
&wpa_version);
|
||||
|
||||
if (!nm_gconf_get_int_helper (client,
|
||||
nm_gconf_get_int_helper (client,
|
||||
GCONF_PATH_WIRELESS_NETWORKS,
|
||||
WPA_EAP_PREFIX"key_mgt",
|
||||
network,
|
||||
&key_mgmt))
|
||||
&key_mgmt);
|
||||
|
||||
if (!nm_gconf_get_string_helper (client,
|
||||
nm_gconf_get_string_helper (client,
|
||||
GCONF_PATH_WIRELESS_NETWORKS,
|
||||
WPA_EAP_PREFIX"identity",
|
||||
network,
|
||||
&identity))
|
||||
goto out;
|
||||
&identity);
|
||||
|
||||
if (!nm_gconf_get_string_helper (client,
|
||||
nm_gconf_get_string_helper (client,
|
||||
GCONF_PATH_WIRELESS_NETWORKS,
|
||||
WPA_EAP_PREFIX"passwd",
|
||||
network,
|
||||
&passwd))
|
||||
goto out;
|
||||
&passwd);
|
||||
|
||||
if (!nm_gconf_get_string_helper (client,
|
||||
nm_gconf_get_string_helper (client,
|
||||
GCONF_PATH_WIRELESS_NETWORKS,
|
||||
WPA_EAP_PREFIX"anon_identity",
|
||||
network,
|
||||
&anon_identity))
|
||||
goto out;
|
||||
&anon_identity);
|
||||
|
||||
if (!nm_gconf_get_string_helper (client,
|
||||
nm_gconf_get_string_helper (client,
|
||||
GCONF_PATH_WIRELESS_NETWORKS,
|
||||
WPA_EAP_PREFIX"private_key_passwd",
|
||||
network,
|
||||
&private_key_passwd))
|
||||
goto out;
|
||||
&private_key_passwd);
|
||||
|
||||
if (!nm_gconf_get_string_helper (client,
|
||||
nm_gconf_get_string_helper (client,
|
||||
GCONF_PATH_WIRELESS_NETWORKS,
|
||||
WPA_EAP_PREFIX"private_key_file",
|
||||
network,
|
||||
&private_key_file))
|
||||
goto out;
|
||||
&private_key_file);
|
||||
|
||||
if (!nm_gconf_get_string_helper (client,
|
||||
nm_gconf_get_string_helper (client,
|
||||
GCONF_PATH_WIRELESS_NETWORKS,
|
||||
WPA_EAP_PREFIX"client_cert_file",
|
||||
network,
|
||||
&client_cert_file))
|
||||
goto out;
|
||||
&client_cert_file);
|
||||
|
||||
if (!nm_gconf_get_string_helper (client,
|
||||
nm_gconf_get_string_helper (client,
|
||||
GCONF_PATH_WIRELESS_NETWORKS,
|
||||
WPA_EAP_PREFIX"ca_cert_file",
|
||||
network,
|
||||
&ca_cert_file))
|
||||
goto out;
|
||||
&ca_cert_file);
|
||||
|
||||
/* Success, build up our security object */
|
||||
security = g_object_new (NM_TYPE_GCONF_WSO_WPA_EAP, NULL);
|
||||
|
|
@ -214,7 +204,6 @@ nm_gconf_wso_wpa_eap_new_deserialize_gconf (GConfClient *client, const char *net
|
|||
g_free (client_cert_file);
|
||||
g_free (ca_cert_file);
|
||||
|
||||
out:
|
||||
return security;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -137,6 +137,10 @@ nm_gconf_wso_new_deserialize_gconf (GConfClient *client,
|
|||
security = NM_GCONF_WSO (nm_gconf_wso_wpa_psk_new_deserialize_gconf (client, network, we_cipher));
|
||||
break;
|
||||
|
||||
case NM_AUTH_TYPE_WPA_EAP:
|
||||
security = NM_GCONF_WSO (nm_gconf_wso_wpa_eap_new_deserialize_gconf (client, network, we_cipher));
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,15 +125,15 @@ nm_ap_security_new_from_ap (NMAccessPoint *ap)
|
|||
|
||||
/* Deteremine best encryption algorithm to use */
|
||||
caps = nm_ap_get_capabilities (ap);
|
||||
if ((caps & WPA_CCMP_PSK) || (caps & WPA2_CCMP_PSK))
|
||||
if (((caps & WPA_CCMP_PSK) == WPA_CCMP_PSK) || ((caps & WPA2_CCMP_PSK) == WPA2_CCMP_PSK))
|
||||
security = NM_AP_SECURITY (nm_ap_security_wpa_psk_new_from_ap (ap, IW_AUTH_CIPHER_CCMP));
|
||||
else if ((caps & WPA_TKIP_PSK) || (caps & WPA2_TKIP_PSK))
|
||||
else if (((caps & WPA_TKIP_PSK) == WPA_TKIP_PSK) || ((caps & WPA2_TKIP_PSK) == WPA2_TKIP_PSK))
|
||||
security = NM_AP_SECURITY (nm_ap_security_wpa_psk_new_from_ap (ap, IW_AUTH_CIPHER_TKIP));
|
||||
else if ((caps & WPA_EAP) || (caps & WPA2_EAP))
|
||||
else if (((caps & WPA_EAP) == WPA_EAP) || ((caps & WPA2_EAP) == WPA2_EAP))
|
||||
security = NM_AP_SECURITY (nm_ap_security_wpa_eap_new_from_ap (ap));
|
||||
else if (caps & WEP_WEP104)
|
||||
else if ((caps & WEP_WEP104) == WEP_WEP104)
|
||||
security = NM_AP_SECURITY (nm_ap_security_wep_new_from_ap (ap, IW_AUTH_CIPHER_WEP104));
|
||||
else if (caps & WEP_WEP40)
|
||||
else if ((caps & WEP_WEP40) == WEP_WEP40)
|
||||
security = NM_AP_SECURITY (nm_ap_security_wep_new_from_ap (ap, IW_AUTH_CIPHER_WEP40));
|
||||
else if (!nm_ap_get_encrypted (ap))
|
||||
security = nm_ap_security_new (IW_AUTH_CIPHER_NONE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue