From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 17/17] auto-t: add AP test for all pairwise/group cipher combos
Date: Tue, 1 Nov 2022 13:17:47 -0700 [thread overview]
Message-ID: <20221101201747.143379-17-prestwoj@gmail.com> (raw)
In-Reply-To: <20221101201747.143379-1-prestwoj@gmail.com>
Iterates through every possible cipher combination and verifies the
AP can authenticate the clients.
---
autotests/testAP/connection_test.py | 33 ++++++++++++++++++++++++-----
1 file changed, 28 insertions(+), 5 deletions(-)
diff --git a/autotests/testAP/connection_test.py b/autotests/testAP/connection_test.py
index dff415e7..297a8aa2 100644
--- a/autotests/testAP/connection_test.py
+++ b/autotests/testAP/connection_test.py
@@ -1,6 +1,7 @@
#! /usr/bin/python3
import unittest
+import os
from iwd import IWD
from config import ctx
@@ -8,6 +9,8 @@ from validation import validate, client_connect
class Test(unittest.TestCase):
def test_connection_success(self):
+ IWD.copy_to_storage('TestAP1.psk')
+
wd = IWD(True)
dev1, dev2 = wd.list_devices(2)
@@ -22,6 +25,8 @@ class Test(unittest.TestCase):
client_connect(wd, dev1, 'TestAP1')
def test_client_start_ap(self):
+ IWD.copy_to_storage('TestAP1.psk')
+
wd = IWD(True)
dev1, dev2 = wd.list_devices(2)
@@ -39,12 +44,30 @@ class Test(unittest.TestCase):
validate(wd, dev2, dev1, 'TestAP2', 'Password2')
- @classmethod
- def setUpClass(cls):
- IWD.copy_to_storage('TestAP1.psk')
+ def test_ciphers(self):
+ ciphers = ['TKIP', 'CCMP', 'GCMP', 'CCMP-256', 'GCMP-256']
+
+ for pairwise in ciphers:
+ for group in ciphers:
+ IWD.copy_to_ap('TestAP2.ap')
+ os.system('echo "PairwiseCiphers=%s" >> /tmp/iwd/ap/TestAP2.ap' % pairwise)
+ os.system('echo "GroupCipher=%s" >> /tmp/iwd/ap/TestAP2.ap' % group)
+
+ wd = IWD(True)
+
+ dev1, dev2 = wd.list_devices(2)
+
+ dev1.start_ap('TestAP2')
+
+ try:
+ validate(wd, dev2, dev1, 'TestAP2', 'Password2', ip_checks=False)
+ except:
+ raise Exception("Failed with pairwise=%s group=%s" % (pairwise, group))
+ finally:
+ IWD.clear_storage()
+ del wd
- @classmethod
- def tearDownClass(cls):
+ def tearDown(self):
IWD.clear_storage()
if __name__ == '__main__':
--
2.34.3
prev parent reply other threads:[~2022-11-01 20:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 20:17 [PATCH 01/17] wiphy: add wiphy_get_supported_ciphers James Prestwood
2022-11-01 20:17 ` [PATCH 02/17] ie: add group/pairwise lists of supported ciphers James Prestwood
2022-11-01 20:17 ` [PATCH 03/17] ap: add profile settings PairwiseCiphers/GroupCipher James Prestwood
2022-11-01 20:17 ` [PATCH 04/17] p2p: limit ciphers to CCMP/TKIP James Prestwood
2022-11-01 20:17 ` [PATCH 05/17] doc: document PairwiseCiphers/GroupCiphers AP settings James Prestwood
2022-11-01 20:17 ` [PATCH 06/17] ap: add frequency to AP interface James Prestwood
2022-11-01 20:50 ` Denis Kenzior
2022-11-01 20:17 ` [PATCH 07/17] client: show frequency with ap show James Prestwood
2022-11-01 20:17 ` [PATCH 08/17] ap: add PairwiseCiphers/GroupCipher to dbus interface James Prestwood
2022-11-01 20:17 ` [PATCH 09/17] client: add ap support for PairwiseCiphers/GroupCipher James Prestwood
2022-11-01 20:17 ` [PATCH 10/17] hwsim: add remaining ciphers to supported list James Prestwood
2022-11-01 20:51 ` Denis Kenzior
2022-11-01 20:17 ` [PATCH 11/17] auto-t: test AP fails to start with unsupported ciphers James Prestwood
2022-11-01 20:17 ` [PATCH 12/17] auto-t: fix testAP-no-support disabled ciphers James Prestwood
2022-11-01 20:52 ` Denis Kenzior
2022-11-01 20:17 ` [PATCH 13/17] netdev: add more info to key setting debug messages James Prestwood
2022-11-01 20:53 ` Denis Kenzior
2022-11-01 20:17 ` [PATCH 14/17] netdev: fix key setting for authenticators James Prestwood
2022-11-01 20:17 ` [PATCH 15/17] nl80211util: add key type/idx to nl80211_parse_attrs James Prestwood
2022-11-01 20:56 ` Denis Kenzior
2022-11-01 20:17 ` [PATCH 16/17] netdev: parse michael MIC failure message James Prestwood
2022-11-01 20:17 ` James Prestwood [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221101201747.143379-17-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox