mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
Return GPG_ERR_CARD_NOT_PRESENT when pinentry-mode=loopback.
Since there isn't a way to prompt the user to insert the smartcard when pinentry-mode=loopback, return GPG_ERR_CARD_NOT_PRESENT instead of GPG_ERR_NO_PIN_ENTRY. * agent/divert-scd.c (ask_for_card): Return GPG_ERR_CARD_NOT_PRESENT when pinentry-mode=loopback.
This commit is contained in:
parent
3da10eefcb
commit
cf748e8736
@ -99,6 +99,10 @@ ask_for_card (ctrl_t ctrl, const unsigned char *shadow_info, char **r_kid)
|
||||
else
|
||||
{
|
||||
rc = agent_get_confirmation (ctrl, desc, NULL, NULL, 0);
|
||||
if (ctrl->pinentry_mode == PINENTRY_MODE_LOOPBACK &&
|
||||
gpg_err_code (rc) == GPG_ERR_NO_PIN_ENTRY)
|
||||
rc = gpg_error (GPG_ERR_CARD_NOT_PRESENT);
|
||||
|
||||
xfree (desc);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user