Merge pull request #1535 from Nitrokey/nk-storage-wa

oem-factory-reset: kill scdaemon after aes regenerate on nk storage
This commit is contained in:
tlaurion 2023-11-22 12:33:48 -05:00 committed by GitHub
commit f2f0831a93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -497,6 +497,7 @@ gpg_key_factory_reset() {
# 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
/bin/hotp_verification regenerate ${ADMIN_PIN_DEF} /bin/hotp_verification regenerate ${ADMIN_PIN_DEF}
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)
if gpg --card-status | grep "Signature PIN" | grep -q "not forced"; then if gpg --card-status | grep "Signature PIN" | grep -q "not forced"; then