Skip to content

Commit

Permalink
oem-factory-reset: if for whatever reason 'hotp-verification reset' f…
Browse files Browse the repository at this point in the history
…ails to reset nk3, tell user to contact Nitrokey support and die

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
  • Loading branch information
tlaurion committed Dec 6, 2024
1 parent 1d9624d commit 7939fa1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion initrd/bin/oem-factory-reset
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ reset_nk3_secret_app() {
warn "Resetting Nitrokey 3 Secrets App PIN. Physical presence (touch) will be required"
#TODO, change message when https://github.com/Nitrokey/nitrokey-hotp-verification/issues/41 is fixed
# Reset Nitrokey 3 secret app with PIN
/bin/hotp_verification reset "${ADMIN_PIN}"
if ! /bin/hotp_verification reset "${ADMIN_PIN}"
then
whiptail_error_die "Failed to reset Nitrokey 3 Secrets App with error code $?, contact Nitrokey support"
fi
fi
}

Expand Down

0 comments on commit 7939fa1

Please sign in to comment.