From 751b2fd69cf5bd59f0544d74a881dbaed7b8d920 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Fri, 28 Jun 2019 12:16:59 +0300 Subject: [PATCH] add nfc device search --- tools/testing/tests/tester.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/testing/tests/tester.py b/tools/testing/tests/tester.py index 10cd1d3..b77f690 100644 --- a/tools/testing/tests/tester.py +++ b/tools/testing/tests/tester.py @@ -63,8 +63,17 @@ class Tester: self.client = tester.client def find_device(self,): + print("--- HID ---") print(list(CtapHidDevice.list_devices())) dev = next(CtapHidDevice.list_devices(), None) + if not dev: + try: + from fido2.nfc import CtapNfcDevice + print("--- NFC ---") + print(list(CtapNfcDevice.list_devices())) + dev = next(CtapNfcDevice.list_devices(), None) + except: + print("NFC devices is not supported") if not dev: raise RuntimeError("No FIDO device found") self.dev = dev