From a58bb54f7ddc0da9cba9fdf929f166983b46a00b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 27 Dec 2016 19:24:34 +0200 Subject: [PATCH] tests: More hostapd GET_CONFIG key_mgmt coverage Signed-off-by: Jouni Malinen --- tests/hwsim/test_fils.py | 8 ++++++++ tests/hwsim/test_suite_b.py | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/tests/hwsim/test_fils.py b/tests/hwsim/test_fils.py index 32d41ee5d..959bec3cc 100644 --- a/tests/hwsim/test_fils.py +++ b/tests/hwsim/test_fils.py @@ -65,6 +65,10 @@ def test_fils_sk_full_auth(dev, apdev): raise Exception("GTK rekey timed out") hwsim_utils.test_connectivity(dev[0], hapd) + conf = hapd.get_config() + if conf['key_mgmt'] != 'FILS-SHA256': + raise Exception("Unexpected config key_mgmt: " + conf['key_mgmt']) + def test_fils_sk_sha384_full_auth(dev, apdev): """FILS SK full authentication (SHA384)""" check_fils_capa(dev[0]) @@ -109,6 +113,10 @@ def test_fils_sk_sha384_full_auth(dev, apdev): raise Exception("GTK rekey timed out") hwsim_utils.test_connectivity(dev[0], hapd) + conf = hapd.get_config() + if conf['key_mgmt'] != 'FILS-SHA384': + raise Exception("Unexpected config key_mgmt: " + conf['key_mgmt']) + def test_fils_sk_pmksa_caching(dev, apdev): """FILS SK and PMKSA caching""" check_fils_capa(dev[0]) diff --git a/tests/hwsim/test_suite_b.py b/tests/hwsim/test_suite_b.py index e4531e823..8fd4caeb1 100644 --- a/tests/hwsim/test_suite_b.py +++ b/tests/hwsim/test_suite_b.py @@ -84,6 +84,10 @@ def test_suite_b(dev, apdev): if "CTRL-EVENT-EAP-STARTED" in ev: raise Exception("Unexpected EAP exchange") + conf = hapd.get_config() + if conf['key_mgmt'] != 'WPA-EAP-SUITE-B': + raise Exception("Unexpected config key_mgmt: " + conf['key_mgmt']) + def suite_b_as_params(): params = {} params['ssid'] = 'as' @@ -187,6 +191,10 @@ def test_suite_b_192(dev, apdev): if "CTRL-EVENT-EAP-STARTED" in ev: raise Exception("Unexpected EAP exchange") + conf = hapd.get_config() + if conf['key_mgmt'] != 'WPA-EAP-SUITE-B-192': + raise Exception("Unexpected config key_mgmt: " + conf['key_mgmt']) + def test_suite_b_192_radius(dev, apdev): """WPA2/GCMP-256 (RADIUS) connection at Suite B 192-bit level""" check_suite_b_192_capa(dev)