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

Add confirm option to allow automated updates on nk3 devices #575

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

anotherbridge
Copy link
Contributor

This PR introduces an option to the nk3 update subcommand that allows the update to be automated.

Changes

  • Add option --confirm to confirm udpate.

Important

The automation is only allowed for updates of the firmware. Downgrades or other potential issues that require user interaction are NOT included in this option. I.e. the confirmation applies only to the functions confirm_download and confirm_update.

Note

I noticed that the update function for the Nitrokey FIDO2 uses -y or --yes for a similar flag. However, to stay within the naming convention of the class functions of the nk3 interface, I decided to name the flag --confirm.

Checklist

Make sure to run make check and make fix before creating a PR, otherwise the CI will fail.

  • tested with Python3.9

  • signed commits

  • updated documentation (e.g. parameter description, inline doc, docs.nitrokey)

    • parameter description
    • inline doc
    • Nitrokey docs
  • added labels

Test Environment and Execution

  • OS: macOS Sequoia 15.0
  • device's model: Nitrokey 3C NFC
  • device's firmware version:
    • Before update: v1.6.0-test.20231218
    • After testing changes: v1.7.0 and v1.7.2 (tested with --version option andwithout)

@daringer daringer self-requested a review September 27, 2024 09:54
@daringer
Copy link
Collaborator

Cool, thank you!
Can you please squash the 2 commits together - other than that this LGTM!

@anotherbridge
Copy link
Contributor Author

@daringer Thanks for the hint! The commits are now squashed.

@daringer daringer merged commit fc73842 into Nitrokey:master Oct 1, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants