hwsim: add additional ciphers to disable list
PATCH 1/2 hwsim: add additional ciphers to disable list
Allows these ciphers to be disabled when creating radios.
--- tools/hwsim.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
tools/hwsim.c +7 -1
@@ -196,7 +196,13 @@ static const struct hwsim_support cipher_map[] = { { "wep104", CRYPTO_CIPHER_WEP104 }, { "tkip", CRYPTO_CIPHER_TKIP }, { "ccmp", CRYPTO_CIPHER_CCMP }, - { "bip", CRYPTO_CIPHER_BIP_CMAC }, + { "bip_cmac", CRYPTO_CIPHER_BIP_CMAC }, + { "gcmp", CRYPTO_CIPHER_GCMP }, + { "gcmp_256", CRYPTO_CIPHER_GCMP_256 }, + { "ccmp_256", CRYPTO_CIPHER_CCMP_256 }, + { "bip_gmac", CRYPTO_CIPHER_BIP_GMAC }, + { "bip_gmac_256", CRYPTO_CIPHER_BIP_GMAC_256 }, + { "bip_cmac_256", CRYPTO_CIPHER_BIP_CMAC_256 }, { } };
Signature · 1 line
2.34.3
PATCH 2/2 auto-t: test AP mode using TKIP
This limits all supported ciphers to TKIP and verifies the AP starts and can authenticate clients.
--- .../testAP-no-support/connection_test.py | 31 +++++++++++++++++-- autotests/testAP-no-support/hw.conf | 7 +++-- 2 files changed, 33 insertions(+), 5 deletions(-)
autotests/testAP-no-support/connection_test.py +28 -3
@@ -5,17 +5,42 @@ import sys sys.path.append('../util') import iwd -from iwd import IWD +from iwd import IWD, NetworkType, PSKAgent class Test(unittest.TestCase): - def test_connection_success(self): - wd = IWD() + def test_no_ap_mode(self): + wd = IWD(True) dev = wd.list_devices(1)[0] with self.assertRaises(iwd.NotSupportedEx): dev.start_ap('TestAP2', 'Password2') + def test_only_tkip_support(self): + wd = IWD(True) + + devices = wd.list_devices(2) + + dev_sta = devices[0] + dev_ap = devices[1] + + dev_ap.start_ap('TestAP2', 'Password2') + + ordered_network = dev_sta.get_ordered_network('TestAP2') + + if ordered_network.type != NetworkType.psk: + raise Exception("Network type mismatch") + + psk_agent = PSKAgent('Password2') + wd.register_psk_agent(psk_agent) + + ordered_network.network_object.connect() + + condition = 'obj.state == DeviceState.connected' + wd.wait_for_object_condition(dev_sta, condition) + + wd.unregister_psk_agent(psk_agent) + @classmethod def setUpClass(cls): pass
autotests/testAP-no-support/hw.conf +5 -2
@@ -1,6 +1,9 @@ [SETUP] -num_radios=1 -radio_confs=rad0 +num_radios=2 +start_iwd=0 [rad0] iftype_disable=ap + +[rad1] +cipher_disable=ccmp,bip_cmac,gcmp,gcmp_256,ccmp_256,bip_gmac.bip_gmac_256,bip_cmac_256
Signature · 1 line
2.34.3
Hi James,
Quoted 5 lines · James Prestwood
Allows these ciphers to be disabled when creating radios.
--- tools/hwsim.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Both applied, thanks.
Regards,
-Denis