Commit 2e8746aa authored by Jiří Klimeš's avatar Jiří Klimeš

core: remove 'wep40' and 'wep104' from several places in NM

wep40 and wep104 are not valid values for 'pairwise' property and they are not
used for dynamic WEP as 'group' ciphers as well.

See https://bugzilla.redhat.com/show_bug.cgi?id=1005171 for some details.
parent cd00e380
......@@ -2008,7 +2008,7 @@ test_setting_wireless_security_changed_signal (void)
ASSERT_CHANGED (nm_setting_wireless_security_clear_protos (s_wsec));
/* Pairwise ciphers */
ASSERT_CHANGED (nm_setting_wireless_security_add_pairwise (s_wsec, "wep40"));
ASSERT_CHANGED (nm_setting_wireless_security_add_pairwise (s_wsec, "tkip"));
ASSERT_CHANGED (nm_setting_wireless_security_remove_pairwise (s_wsec, 0));
ASSERT_UNCHANGED (nm_setting_wireless_security_remove_pairwise (s_wsec, 1));
......
......@@ -156,7 +156,7 @@ verify_no_wpa (NMSettingWirelessSecurity *s_wsec,
const char *pw;
pw = nm_setting_wireless_security_get_pairwise (s_wsec, i);
if (strcmp (pw, "wep40") && strcmp (pw, "wep104")) {
if (!strcmp (pw, "tkip") || !strcmp (pw, "ccmp")) {
g_set_error (error,
NM_SETTING_WIRELESS_SECURITY_ERROR,
NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY,
......@@ -610,10 +610,6 @@ nm_ap_utils_complete_connection (const GByteArray *ap_ssid,
NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "ieee8021x",
NM_SETTING_WIRELESS_SECURITY_AUTH_ALG, "open",
NULL);
nm_setting_wireless_security_add_pairwise (s_wsec, "wep40");
nm_setting_wireless_security_add_pairwise (s_wsec, "wep104");
nm_setting_wireless_security_add_group (s_wsec, "wep40");
nm_setting_wireless_security_add_group (s_wsec, "wep104");
if (s_8021x) {
/* Dynamic WEP requires a valid 802.1x setting since we can't
......
......@@ -336,10 +336,6 @@ pair_to_flags (const char *str)
{
g_return_val_if_fail (str != NULL, NM_802_11_AP_SEC_NONE);
if (strcmp (str, "wep40") == 0)
return NM_802_11_AP_SEC_PAIR_WEP40;
if (strcmp (str, "wep104") == 0)
return NM_802_11_AP_SEC_PAIR_WEP104;
if (strcmp (str, "tkip") == 0)
return NM_802_11_AP_SEC_PAIR_TKIP;
if (strcmp (str, "ccmp") == 0)
......
......@@ -857,10 +857,6 @@ test_priv_ap_dynamic_wep_1 (void)
const KeyData exp_wsec[] = {
{ NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "ieee8021x", 0 },
{ NM_SETTING_WIRELESS_SECURITY_AUTH_ALG, "open", 0 },
{ NM_SETTING_WIRELESS_SECURITY_PAIRWISE, "wep40", 0 },
{ NM_SETTING_WIRELESS_SECURITY_PAIRWISE, "wep104", 0 },
{ NM_SETTING_WIRELESS_SECURITY_GROUP, "wep40", 0 },
{ NM_SETTING_WIRELESS_SECURITY_GROUP, "wep104", 0 },
{ NULL } };
gboolean success;
GError *error = NULL;
......@@ -908,10 +904,6 @@ test_priv_ap_dynamic_wep_2 (void)
const KeyData exp_wsec[] = {
{ NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "ieee8021x", 0 },
{ NM_SETTING_WIRELESS_SECURITY_AUTH_ALG, "open", 0 },
{ NM_SETTING_WIRELESS_SECURITY_PAIRWISE, "wep40", 0 },
{ NM_SETTING_WIRELESS_SECURITY_PAIRWISE, "wep104", 0 },
{ NM_SETTING_WIRELESS_SECURITY_GROUP, "wep40", 0 },
{ NM_SETTING_WIRELESS_SECURITY_GROUP, "wep104", 0 },
{ NULL } };
gboolean success;
GError *error = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment