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

Stabilize Nitrokey 3 AM and Nitrokey Storage work #26

Merged
merged 24 commits into from
Jun 20, 2023

Conversation

szszszsz
Copy link
Member

@szszszsz szszszsz commented Jun 20, 2023

This PR stabilizes Nitrokey 3 AM and Nitrokey Storage work, by increasing timeout for the former, and increase read attempts for the latter.

Changes list:

  • increase CCID timeout to 2 seconds (from 1) for Nitrokey 3 AM (the longest request required 1001 ms).
  • decrease HID processing delay to 200ms (from 500ms), for a total timeout of 8 seconds
  • add processing delay for CCID to avoid busy loop (10ms)
  • add null-checks to CCID operations before processing starts
  • allow to enable logging through CMake options (for HID it must be a Debug build as well)
  • make serial number read work for Nitrokey Storage
  • remove extra init commands for CCID (power off, power on, info) - now only select is called
  • fix tests
  • cleanup error codes

Tested on:

  • Linux Fedora 38
  • Nitrokey Storage v0.57,
  • Nitrokey Pro v0.15,
  • Nitrokey 3 AM v1.5;

using Catch tests and CLI calls.

Fixes Nitrokey/trussed-secrets-app#88

@szszszsz szszszsz merged commit b69bb20 into master Jun 20, 2023
@szszszsz szszszsz deleted the nk3am-usbccid-crash-fix branch June 20, 2023 12:52
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.

NK3AM fails to register a Credential in the clean state
1 participant