Merge pull request #1903 from tlaurion/BUGFIX_non_hotp_nk3_regression_fix

non-hotp boards: skip Secrets App reset with hotp_verification if binary doesn't exit
This commit is contained in:
Thierry Laurion 2025-02-04 09:23:05 -05:00 committed by GitHub
commit 462c157b23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -151,8 +151,9 @@ mount_boot() {
reset_nk3_secret_app() {
TRACE_FUNC
# Reset Nitrokey 3 Secrets app with $ADMIN_PIN (default 12345678, or customised)
if lsusb | grep -q "20a0:42b2"; then
if lsusb | grep -q "20a0:42b2" && [ -x /bin/hotp_verification ]; then
echo
warn "Resetting Nitrokey 3's Secrets App with PIN. Physical presence (touch) will be required"
# TODO: change message when https://github.com/Nitrokey/nitrokey-hotp-verification/issues/41 is fixed