Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore compatibility to fido2-1.0.0 #158

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions solo/devices/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from fido2.attestation import Attestation
from fido2.ctap2 import CTAP2, CredentialManagement
from fido2.ctap2 import Ctap2, CredentialManagement
from fido2.hid import CTAPHID
from fido2.utils import hmac_sha256
from fido2.webauthn import PublicKeyCredentialCreationOptions
Expand Down Expand Up @@ -76,7 +76,7 @@ def ping(self, data="pong"):
def reset(
self,
):
CTAP2(self.get_current_hid_device()).reset()
Ctap2(self.get_current_hid_device()).reset()

def change_pin(self, old_pin, new_pin):
client = self.get_current_fido_client()
Expand Down Expand Up @@ -114,7 +114,7 @@ def make_credential(self, pin=None):
def cred_mgmt(self, pin):
client = self.get_current_fido_client()
token = client.client_pin.get_pin_token(pin)
ctap2 = CTAP2(self.get_current_hid_device())
ctap2 = Ctap2(self.get_current_hid_device())
return CredentialManagement(ctap2, client.client_pin.protocol, token)

def enter_solo_bootloader(
Expand All @@ -137,11 +137,11 @@ def is_solo_bootloader(
pass

def program_kbd(self, cmd):
ctap2 = CTAP2(self.get_current_hid_device())
ctap2 = Ctap2(self.get_current_hid_device())
return ctap2.send_cbor(0x51, cmd)

def sign_hash(self, credential_id, dgst, pin):
ctap2 = CTAP2(self.get_current_hid_device())
ctap2 = Ctap2(self.get_current_hid_device())
client = self.get_current_fido_client()
if pin:
pin_token = client.client_pin.get_pin_token(pin)
Expand Down
8 changes: 4 additions & 4 deletions solo/devices/solo_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

from fido2.client import Fido2Client
from fido2.ctap import CtapError
from fido2.ctap1 import CTAP1
from fido2.ctap2 import CTAP2
from fido2.ctap1 import Ctap1
from fido2.ctap2 import Ctap2
from fido2.hid import CTAPHID, CtapHidDevice
from intelhex import IntelHex

Expand Down Expand Up @@ -64,9 +64,9 @@ def find_device(self, dev=None, solo_serial=None):
dev = devices[0]
self.dev = dev

self.ctap1 = CTAP1(dev)
self.ctap1 = Ctap1(dev)
try:
self.ctap2 = CTAP2(dev)
self.ctap2 = Ctap2(dev)
except CtapError:
self.ctap2 = None

Expand Down
4 changes: 2 additions & 2 deletions solo/solotool.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
from fido2.attestation import Attestation
from fido2.client import ClientError, Fido2Client
from fido2.ctap import CtapError
from fido2.ctap1 import CTAP1, ApduError
from fido2.ctap2 import CTAP2
from fido2.ctap1 import Ctap1, ApduError
from fido2.ctap2 import Crap2
from fido2.hid import CTAPHID, CtapHidDevice
from intelhex import IntelHex

Expand Down