oem-factory-reset + seal-hotpkey: Give debug output to underatand in what state is the USB Security dongle

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
This commit is contained in:
Thierry Laurion 2024-04-19 14:30:55 -04:00
parent 00ce2f4d1c
commit fc874728f6
No known key found for this signature in database
GPG Key ID: 9A53E1BB3FF00461
2 changed files with 4 additions and 0 deletions

View File

@ -496,7 +496,9 @@ gpg_key_factory_reset() {
fi fi
# If Nitrokey Storage is inserted, reset AES keys as well # If Nitrokey Storage is inserted, reset AES keys as well
if lsusb | grep -q "20a0:4109" && [ -x /bin/hotp_verification ]; then if lsusb | grep -q "20a0:4109" && [ -x /bin/hotp_verification ]; then
DEBUG "Nitrokey Storage detected, resetting AES keys..."
/bin/hotp_verification regenerate ${ADMIN_PIN_DEF} /bin/hotp_verification regenerate ${ADMIN_PIN_DEF}
DEBUG "Restarting scdaemon to remove possible exclusive lock of dongle"
killall -9 scdaemon killall -9 scdaemon
fi fi
# Toggle forced sig (good security practice, forcing PIN request for each signature request) # Toggle forced sig (good security practice, forcing PIN request for each signature request)

View File

@ -26,6 +26,8 @@ fatal_error()
{ {
echo -e "\nERROR: ${1}; press Enter to continue." echo -e "\nERROR: ${1}; press Enter to continue."
read read
# get lsusb output for debugging
DEBUG "lsusb output: $(lsusb)"
die "$1" die "$1"
} }