We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8306d9c commit fb2c7f8Copy full SHA for fb2c7f8
src/nitrokey/should_use_ccid.py
@@ -0,0 +1,21 @@
1
+import ctypes
2
+import sys
3
+
4
5
+def should_default_ccid() -> bool:
6
+ try:
7
+ import smartcard
8
+ except ImportError:
9
+ return False
10
11
+ if sys.platform != "win32" and sys.platform != "cygwin":
12
+ # Linux or MacOS don't need admin to access with CTAPHID
13
14
15
16
+ if ctypes.windll.shell32.IsUserAnAdmin():
17
18
+ else:
19
+ return True
20
+ except Exception:
21
0 commit comments