mirror of
https://github.com/polhenarejos/pico-fido.git
synced 2025-12-21 05:00:13 +08:00
Adding first backend, for macOS.
In macOS, a SECP256R1 key is generated locally and stored in the keyring. Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
import sys
|
||||
import argparse
|
||||
import platform
|
||||
|
||||
try:
|
||||
from fido2.ctap2.config import Config
|
||||
@@ -44,6 +45,16 @@ except:
|
||||
from enum import IntEnum
|
||||
from binascii import hexlify
|
||||
|
||||
if (platform.system() == 'Windows'):
|
||||
from secure_key import windows as skey
|
||||
elif (platform.system() == 'Linux'):
|
||||
from secure_key import linux as skey
|
||||
elif (platform.system() == 'Darwin'):
|
||||
from secure_key import macos as skey
|
||||
else:
|
||||
print('ERROR: platform not supported')
|
||||
sys.exit(-1)
|
||||
|
||||
class VendorConfig(Config):
|
||||
|
||||
class PARAM(IntEnum):
|
||||
@@ -63,7 +74,7 @@ class VendorConfig(Config):
|
||||
super().__init__(ctap, pin_uv_protocol, pin_uv_token)
|
||||
|
||||
def _get_key_device(self):
|
||||
return b"\x69"*32
|
||||
return skey.get_secure_key()
|
||||
|
||||
def _get_shared_key(self):
|
||||
ret = self._call(
|
||||
|
||||
Reference in New Issue
Block a user