]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: DPP QR Code and authentication exchange (rand_mac_addr=1)
authorJouni Malinen <jouni@codeaurora.org>
Wed, 22 Apr 2020 14:04:08 +0000 (17:04 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 22 Apr 2020 14:09:01 +0000 (17:09 +0300)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_dpp.py

index 2cff4c814ad14d206bfabd021344c43b469fe260..02329e08830a3d2d880a4e582eef5cdf3510be40 100644 (file)
@@ -5310,3 +5310,15 @@ def run_dpp_reconfig_connector(dev, apdev):
     if n_net_access_key.strip('"') != net_access_key:
         raise Exception("net_access_key mismatch: %s %s" % (n_net_access_key,
                                                             net_access_key))
+
+def test_dpp_qr_code_auth_rand_mac_addr(dev, apdev):
+    """DPP QR Code and authentication exchange (rand_mac_addr=1)"""
+    flags = int(dev[0].get_driver_status_field('capa.flags'), 16)
+    if flags & 0x0000400000000000 == 0:
+        raise HwsimSkip("Driver does not support random GAS TA")
+
+    try:
+        dev[0].set("gas_rand_mac_addr", "1")
+        run_dpp_qr_code_auth_unicast(dev, apdev, None)
+    finally:
+        dev[0].set("gas_rand_mac_addr", "0")