Skip to content

Commit

Permalink
Merge branch '382-nkfido2-update-error-message'
Browse files Browse the repository at this point in the history
Add quick support tip for the Nitrokey FIDO2 128 revival as a workaround
for missing the proper model detection for the update process.

Fixes #382
  • Loading branch information
szszszsz committed May 12, 2023
2 parents 9141c09 + 9585802 commit 33bbc0f
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions pynitrokey/fido2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import pynitrokey.fido2 as nkfido2
from pynitrokey import helpers
from pynitrokey.fido2.commands import SoloBootloader, SoloExtension
from pynitrokey.helpers import local_critical
from pynitrokey.helpers import local_critical, local_print


class CliOrProvidedInteraction(UserInteraction):
Expand Down Expand Up @@ -543,11 +543,17 @@ def isCorrectVersion(current, target):
raise
print("...error!")

# if not success:
# for v in firmware_file_data["versions"]:
# sig = v["signature"]
# print(f'Trying with {sig}')
# self.verify_flash(sig)
if not success:
msg = """Bootloader reports failure in the signature verification. If your device is staying in the
bootloader mode after reinserting it into the USB port, please execute the following to make it work again:
# Download the compressed firmware file for Nitrokey FIDO2 128 v2.4.1 and extract it
wget https://github.com/Nitrokey/nitrokey-fido2-firmware/releases/download/2.4.1.nitrokey/nitrokey-fido2-firmware-2.4.1-128kB-app-signed.zip
unzip nitrokey-fido2-firmware-2.4.1-128kB-app-signed.zip
# Run the update process again with the just downloaded firmware
nitropy fido2 util program bootloader nitrokey-fido2-firmware-2.4.1-128kB-app-signed.json
"""
local_critical(msg, support_hint=False)

return sig

Expand Down

0 comments on commit 33bbc0f

Please sign in to comment.