]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
dpp-nfc: Use Configurator/Enrollee parameters with tag reading
authorJouni Malinen <jouni@codeaurora.org>
Thu, 14 May 2020 18:46:50 +0000 (21:46 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 14 May 2020 18:46:50 +0000 (21:46 +0300)
This was previously done only for the negotiated connection handover
case, but the same parameters are useful for the tag reading cases (URI
record and static handover).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/examples/dpp-nfc.py

index e448315baefcc0e738c94456563c4e19387ec311..86524ab1736c733d27f44ad0ab3d1d7c0660d4cb 100755 (executable)
@@ -80,8 +80,16 @@ def dpp_nfc_uri_process(uri):
         print("Could not parse DPP URI from NFC URI record")
         return False
     peer_id = int(peer_id)
-    print("peer_id=%d" % peer_id)
+    print("peer_id=%d for URI from NFC Tag: %s" % (peer_id, uri))
     cmd = "DPP_AUTH_INIT peer=%d" % peer_id
+    global enrollee_only, configurator_only, config_params
+    if enrollee_only:
+        cmd += " role=enrollee"
+    elif configurator_only:
+        cmd += " role=configurator"
+    if config_params:
+        cmd += " " + config_params
+    print("Initiate DPP authentication: " + cmd)
     res = wpas.request(cmd)
     if "OK" not in res:
         print("Failed to initiate DPP Authentication")