aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2018-04-12 18:14:33 (GMT)
committerJouni Malinen <j@w1.fi>2018-04-12 18:14:33 (GMT)
commite5b0b58bfa11ae7a1e16980e1b14ff218de493c0 (patch)
tree7f89b39244e486ca321f39f8e2d68c58932fd2d0
parent3dfccf7c09f7295d22cd4fbc2496874dc9b906d5 (diff)
downloadhostap-e5b0b58bfa11ae7a1e16980e1b14ff218de493c0.zip
hostap-e5b0b58bfa11ae7a1e16980e1b14ff218de493c0.tar.gz
hostap-e5b0b58bfa11ae7a1e16980e1b14ff218de493c0.tar.bz2
tests: DPP and SAE AKMs
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--tests/hwsim/test_dpp.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/hwsim/test_dpp.py b/tests/hwsim/test_dpp.py
index 525469f..5f0e8ab 100644
--- a/tests/hwsim/test_dpp.py
+++ b/tests/hwsim/test_dpp.py
@@ -1330,6 +1330,48 @@ def test_dpp_network_introduction(dev, apdev):
if val != "DPP":
raise Exception("Unexpected key_mgmt: " + val)
+def test_dpp_and_sae_akm(dev, apdev):
+ """DPP and SAE AKMs"""
+ check_dpp_capab(dev[0])
+ check_dpp_capab(dev[1])
+ if "SAE" not in dev[1].get_capability("auth_alg"):
+ raise HwsimSkip("SAE not supported")
+
+ csign = "3059301306072a8648ce3d020106082a8648ce3d03010703420004d02e5bd81a120762b5f0f2994777f5d40297238a6c294fd575cdf35fabec44c050a6421c401d98d659fd2ed13c961cc8287944dd3202f516977800d3ab2f39ee"
+ ap_connector = "eyJ0eXAiOiJkcHBDb24iLCJraWQiOiJzOEFrYjg5bTV4UGhoYk5UbTVmVVo0eVBzNU5VMkdxYXNRY3hXUWhtQVFRIiwiYWxnIjoiRVMyNTYifQ.eyJncm91cHMiOlt7Imdyb3VwSWQiOiIqIiwibmV0Um9sZSI6ImFwIn1dLCJuZXRBY2Nlc3NLZXkiOnsia3R5IjoiRUMiLCJjcnYiOiJQLTI1NiIsIngiOiIwOHF4TlNYRzRWemdCV3BjVUdNSmc1czNvbElOVFJsRVQ1aERpNkRKY3ZjIiwieSI6IlVhaGFYQXpKRVpRQk1YaHRUQnlZZVlrOWtJYjk5UDA3UV9NcW9TVVZTVEkifX0.a5_nfMVr7Qe1SW0ZL3u6oQRm5NUCYUSfixDAJOUFN3XUfECBZ6E8fm8xjeSfdOytgRidTz0CTlIRjzPQo82dmQ"
+ ap_netaccesskey = "30770201010420f6531d17f29dfab655b7c9e923478d5a345164c489aadd44a3519c3e9dcc792da00a06082a8648ce3d030107a14403420004d3cab13525c6e15ce0056a5c506309839b37a2520d4d19444f98438ba0c972f751a85a5c0cc911940131786d4c1c9879893d9086fdf4fd3b43f32aa125154932"
+ sta_connector = "eyJ0eXAiOiJkcHBDb24iLCJraWQiOiJzOEFrYjg5bTV4UGhoYk5UbTVmVVo0eVBzNU5VMkdxYXNRY3hXUWhtQVFRIiwiYWxnIjoiRVMyNTYifQ.eyJncm91cHMiOlt7Imdyb3VwSWQiOiIqIiwibmV0Um9sZSI6InN0YSJ9XSwibmV0QWNjZXNzS2V5Ijp7Imt0eSI6IkVDIiwiY3J2IjoiUC0yNTYiLCJ4IjoiZWMzR3NqQ3lQMzVBUUZOQUJJdEltQnN4WXVyMGJZX1dES1lfSE9zUGdjNCIsInkiOiJTRS1HVllkdWVnTFhLMU1TQXZNMEx2QWdLREpTNWoyQVhCbE9PMTdUSTRBIn19.PDK9zsGlK-e1pEOmNxVeJfCS8pNeay6ckIS1TXCQsR64AR-9wFPCNVjqOxWvVKltehyMFqVAtOcv0IrjtMJFqQ"
+ sta_netaccesskey = "30770201010420bc33380c26fd2168b69cd8242ed1df07ba89aa4813f8d4e8523de6ca3f8dd28ba00a06082a8648ce3d030107a1440342000479cdc6b230b23f7e40405340048b48981b3162eaf46d8fd60ca63f1ceb0f81ce484f8655876e7a02d72b531202f3342ef020283252e63d805c194e3b5ed32380"
+
+ params = { "ssid": "dpp+sae",
+ "wpa": "2",
+ "wpa_key_mgmt": "DPP SAE",
+ "ieee80211w": "2",
+ "rsn_pairwise": "CCMP",
+ "sae_password": "sae-password",
+ "dpp_connector": ap_connector,
+ "dpp_csign": csign,
+ "dpp_netaccesskey": ap_netaccesskey }
+ try:
+ hapd = hostapd.add_ap(apdev[0], params)
+ except:
+ raise HwsimSkip("DPP not supported")
+
+ id = dev[0].connect("dpp+sae", key_mgmt="DPP", scan_freq="2412",
+ ieee80211w="2",
+ dpp_csign=csign,
+ dpp_connector=sta_connector,
+ dpp_netaccesskey=sta_netaccesskey)
+ val = dev[0].get_status_field("key_mgmt")
+ if val != "DPP":
+ raise Exception("Unexpected key_mgmt for DPP: " + val)
+
+ id = dev[1].connect("dpp+sae", key_mgmt="SAE", scan_freq="2412",
+ ieee80211w="2", psk="sae-password")
+ val = dev[1].get_status_field("key_mgmt")
+ if val != "SAE":
+ raise Exception("Unexpected key_mgmt for SAE: " + val)
+
def test_dpp_ap_config(dev, apdev):
"""DPP and AP configuration"""
run_dpp_ap_config(dev, apdev)