mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-22 02:35:25 +00:00
2008-03-30 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-wireless-security.c - (need_secrets): only require key0 if the transmit key index is also 0 - (verify): reject non-NULL but zero-length WEP keys; these are invalid git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3515 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
6fc5e8143f
commit
62cebd438f
|
@ -1,3 +1,10 @@
|
|||
2008-03-30 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* libnm-util/nm-setting-wireless-security.c
|
||||
- (need_secrets): only require key0 if the transmit key index is also
|
||||
0
|
||||
- (verify): reject non-NULL but zero-length WEP keys; these are invalid
|
||||
|
||||
2008-03-29 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* libnm-util/nm-setting-8021x.c
|
||||
|
|
|
@ -93,19 +93,19 @@ need_secrets (NMSetting *setting)
|
|||
|
||||
/* Static WEP */
|
||||
if (strcmp (self->key_mgmt, "none") == 0) {
|
||||
if (!verify_wep_key (self->wep_key0)) {
|
||||
if ((self->wep_tx_keyidx == 0) && !verify_wep_key (self->wep_key0)) {
|
||||
g_ptr_array_add (secrets, NM_SETTING_WIRELESS_SECURITY_WEP_KEY0);
|
||||
return secrets;
|
||||
}
|
||||
if (self->wep_tx_keyidx == 1 && !verify_wep_key (self->wep_key1)) {
|
||||
if ((self->wep_tx_keyidx == 1) && !verify_wep_key (self->wep_key1)) {
|
||||
g_ptr_array_add (secrets, NM_SETTING_WIRELESS_SECURITY_WEP_KEY1);
|
||||
return secrets;
|
||||
}
|
||||
if (self->wep_tx_keyidx == 2 && !verify_wep_key (self->wep_key2)) {
|
||||
if ((self->wep_tx_keyidx == 2) && !verify_wep_key (self->wep_key2)) {
|
||||
g_ptr_array_add (secrets, NM_SETTING_WIRELESS_SECURITY_WEP_KEY2);
|
||||
return secrets;
|
||||
}
|
||||
if (self->wep_tx_keyidx == 3 && !verify_wep_key (self->wep_key3)) {
|
||||
if ((self->wep_tx_keyidx == 3) && !verify_wep_key (self->wep_key3)) {
|
||||
g_ptr_array_add (secrets, NM_SETTING_WIRELESS_SECURITY_WEP_KEY3);
|
||||
return secrets;
|
||||
}
|
||||
|
@ -198,6 +198,23 @@ verify (NMSetting *setting, GSList *all_settings)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (self->wep_key0 && !strlen (self->wep_key0)) {
|
||||
g_warning ("Invalid zero-length WEP key #0.");
|
||||
return FALSE;
|
||||
}
|
||||
if (self->wep_key1 && !strlen (self->wep_key1)) {
|
||||
g_warning ("Invalid zero-length WEP key #1.");
|
||||
return FALSE;
|
||||
}
|
||||
if (self->wep_key2 && !strlen (self->wep_key2)) {
|
||||
g_warning ("Invalid zero-length WEP key #2.");
|
||||
return FALSE;
|
||||
}
|
||||
if (self->wep_key3 && !strlen (self->wep_key3)) {
|
||||
g_warning ("Invalid zero-length WEP key #3.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (self->auth_alg && !nm_utils_string_in_list (self->auth_alg, valid_auth_algs)) {
|
||||
g_warning ("Invalid authentication algorithm");
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue