fix(crypt-gpg): execute --card-status on each try

If the gpg card is not inserted before the --card-status command is
executed then the public key is not linked with the card. Therefore,
the LUKS partition cannot be decrypted. To solve this, the
--card--status command is executed on each try.
master
LinkTed 2021-06-21 19:15:01 +02:00 committed by Jóhann B. Guðmundsson
parent c7fbc0c890
commit 6610093698
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ gpg_decrypt() {
fi

ask_for_password \
--cmd "gpg $opts --decrypt $mntp/$keypath" \
--cmd "GNUPGHOME=$gpghome gpg --card-status --no-tty > /dev/null 2>&1; gpg $opts --decrypt $mntp/$keypath" \
--prompt "${inputPrompt:-Password ($keypath on $keydev for $device)}" \
--tries 3 --tty-echo-off