tests: Fix wpas_ctrl_network for builds without Suite B support

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-11-02 00:30:00 +02:00
parent f10ff62e4e
commit d0f56772ea

View file

@ -62,7 +62,7 @@ def test_wpas_ctrl_network(dev):
raise Exception("Unexpected success for invalid SET_NETWORK: " + t) raise Exception("Unexpected success for invalid SET_NETWORK: " + t)
tests = (("key_mgmt", "WPA-PSK WPA-EAP IEEE8021X NONE WPA-NONE FT-PSK FT-EAP WPA-PSK-SHA256 WPA-EAP-SHA256"), tests = (("key_mgmt", "WPA-PSK WPA-EAP IEEE8021X NONE WPA-NONE FT-PSK FT-EAP WPA-PSK-SHA256 WPA-EAP-SHA256"),
("key_mgmt", "WPS SAE FT-SAE OSEN WPA-EAP-SUITE-B WPA-EAP-SUITE-B-192"), ("key_mgmt", "WPS SAE FT-SAE OSEN"),
("pairwise", "CCMP-256 GCMP-256 CCMP GCMP TKIP"), ("pairwise", "CCMP-256 GCMP-256 CCMP GCMP TKIP"),
("group", "CCMP-256 GCMP-256 CCMP GCMP TKIP"), ("group", "CCMP-256 GCMP-256 CCMP GCMP TKIP"),
("auth_alg", "OPEN SHARED LEAP"), ("auth_alg", "OPEN SHARED LEAP"),
@ -82,6 +82,18 @@ def test_wpas_ctrl_network(dev):
if res != value: if res != value:
raise Exception("Unexpected response for '" + field + "': '" + res + "'") raise Exception("Unexpected response for '" + field + "': '" + res + "'")
try:
value = "WPA-EAP-SUITE-B WPA-EAP-SUITE-B-192"
dev[0].set_network(id, "key_mgmt", value)
res = dev[0].get_network(id, "key_mgmt")
if res != value:
raise Exception("Unexpected response for key_mgmt")
except Exception, e:
if str(e).startswith("Unexpected"):
raise
else:
pass
q_tests = (("identity", "hello"), q_tests = (("identity", "hello"),
("anonymous_identity", "foo@nowhere.com")) ("anonymous_identity", "foo@nowhere.com"))
for field, value in q_tests: for field, value in q_tests: