Merge pull request #763 from Nitrokey/storage-factoryreset

Delete AES keys of Nitrokey Storage after reset
This commit is contained in:
tlaurion 2020-08-06 16:14:01 -04:00 committed by GitHub
commit ae9fb74759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,6 +71,10 @@ gpg_key_reset()
ERROR=`cat /tmp/gpg_card_edit_output`
whiptail_error_die "GPG Key factory reset failed!\n\n$ERROR"
fi
# If Nitrokey Storage is inserted, reset AES keys as well
if lsusb | grep -q "20a0:4109" && [ -x /bin/hotp_verification ] ; then
/bin/hotp_verification regenerate ${ADMIN_PIN_DEF}
fi
# Generate OEM GPG keys
{
echo admin