Skip to content

Commit 397a462

Browse files
committed
oem-factory-reset: kill scdaemon after aes regenerate on nk storage
The call to `hotp_verification regenerate` seems to leave the communication in a bad state, thus the following `gpg` calls fail. With this workaround `scdaemon` will resart with the next `gpg` call. Signed-off-by: Markus Meissner <coder@safemailbox.de>
1 parent 1f39d16 commit 397a462

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

initrd/bin/oem-factory-reset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ gpg_key_factory_reset() {
497497
# If Nitrokey Storage is inserted, reset AES keys as well
498498
if lsusb | grep -q "20a0:4109" && [ -x /bin/hotp_verification ]; then
499499
/bin/hotp_verification regenerate ${ADMIN_PIN_DEF}
500+
killall -9 scdaemon
500501
fi
501502
# Toggle forced sig (good security practice, forcing PIN request for each signature request)
502503
if gpg --card-status | grep "Signature PIN" | grep -q "not forced"; then

0 commit comments

Comments
 (0)