mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 12:00:11 +01:00
ifcfg-rh: add testcase for PEAP anonymous identity (rh #708436)
This commit is contained in:
parent
3c0bf572c4
commit
ba390d2430
2 changed files with 16 additions and 1 deletions
|
|
@ -12,4 +12,4 @@ IEEE_8021X_CA_CERT=test_ca_cert.pem
|
|||
IEEE_8021X_PEAP_VERSION=1
|
||||
IEEE_8021X_PEAP_FORCE_NEW_LABEL=yes
|
||||
IEEE_8021X_INNER_AUTH_METHODS=MSCHAPV2
|
||||
|
||||
IEEE_8021X_ANON_IDENTITY=somebody
|
||||
|
|
|
|||
|
|
@ -2707,6 +2707,7 @@ test_read_wired_8021x_peap_mschapv2 (void)
|
|||
GError *error = NULL;
|
||||
const char *tmp;
|
||||
const char *expected_identity = "David Smith";
|
||||
const char *expected_anon_identity = "somebody";
|
||||
const char *expected_password = "foobar baz";
|
||||
gboolean success = FALSE;
|
||||
const char *expected_ca_cert_path;
|
||||
|
|
@ -2793,6 +2794,19 @@ test_read_wired_8021x_peap_mschapv2 (void)
|
|||
NM_SETTING_802_1X_SETTING_NAME,
|
||||
NM_SETTING_802_1X_IDENTITY);
|
||||
|
||||
/* Anonymous Identity */
|
||||
tmp = nm_setting_802_1x_get_anonymous_identity (s_8021x);
|
||||
ASSERT (tmp != NULL,
|
||||
"wired-8021x-peap-mschapv2-verify-8021x", "failed to verify %s: missing %s / %s key",
|
||||
TEST_IFCFG_WIRED_8021x_PEAP_MSCHAPV2,
|
||||
NM_SETTING_802_1X_SETTING_NAME,
|
||||
NM_SETTING_802_1X_ANONYMOUS_IDENTITY);
|
||||
ASSERT (strcmp (tmp, expected_anon_identity) == 0,
|
||||
"wired-8021x-peap-mschapv2-verify-8021x", "failed to verify %s: unexpected %s / %s key value",
|
||||
TEST_IFCFG_WIRED_8021x_PEAP_MSCHAPV2,
|
||||
NM_SETTING_802_1X_SETTING_NAME,
|
||||
NM_SETTING_802_1X_ANONYMOUS_IDENTITY);
|
||||
|
||||
/* Password */
|
||||
tmp = nm_setting_802_1x_get_password (s_8021x);
|
||||
ASSERT (tmp != NULL,
|
||||
|
|
@ -7368,6 +7382,7 @@ test_write_wired_dhcp_8021x_peap_mschapv2 (void)
|
|||
|
||||
g_object_set (s_8021x,
|
||||
NM_SETTING_802_1X_IDENTITY, "Bob Saget",
|
||||
NM_SETTING_802_1X_ANONYMOUS_IDENTITY, "barney",
|
||||
NM_SETTING_802_1X_PASSWORD, "Kids, it was back in October 2008...",
|
||||
NM_SETTING_802_1X_PHASE1_PEAPVER, "1",
|
||||
NM_SETTING_802_1X_PHASE1_PEAPLABEL, "1",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue