oem-factory-reset: In memory GPG keygen + keys copy to card not calling reset_nk3_secret_app, so HOTP PIN not set to GPG PIN when that feature is used (not really used it seems)

Fixes https://github.com/linuxboot/heads/issues/1951

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
This commit is contained in:
Thierry Laurion 2025-04-03 15:03:58 -04:00
parent ea5d948819
commit 4fbd4e7506
No known key found for this signature in database
GPG Key ID: 9A53E1BB3FF00461

View File

@ -1284,6 +1284,8 @@ gpg --list-keys >/dev/null 2>&1
#Generate keys in memory and copy to smartcard
if [ "$GPG_GEN_KEY_IN_MEMORY" = "y" ]; then
# Reset Nitrokey 3 Secrets app before generating keys in memory
reset_nk3_secret_app
if [ "$GPG_ALGO" == "RSA" ]; then
# Generate GPG master key
generate_inmemory_RSA_master_and_subkeys