diff options
author | Ben Kibbey <[email protected]> | 2012-01-25 23:14:51 +0000 |
---|---|---|
committer | Ben Kibbey <[email protected]> | 2012-01-26 00:40:58 +0000 |
commit | 3da10eefcb09a520f11e4fae7f59a33f80ffba69 (patch) | |
tree | 707eb631308d72724ef9b65e7e52b9184dcba81b | |
parent | nPth is now a hard requirement for GnuPG. (diff) | |
download | gnupg-3da10eefcb09a520f11e4fae7f59a33f80ffba69.tar.gz gnupg-3da10eefcb09a520f11e4fae7f59a33f80ffba69.zip |
Also check for GPG_ERR_ASS_CANCELED during an inquire.
Fix pinentry-mode=loopback when cancelling an inquire from scdaemon.
This is similar to commit 4f21f8d but for both protocol command
cancellation and pinentry cancellation.
* agent/call-scd.c (agent_card_pkdecrypt): Check for
GPG_ERR_ASS_CANCELED.
(agent_card_pksign): Ditto.
-rw-r--r-- | agent/call-scd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/agent/call-scd.c b/agent/call-scd.c index ccdb637d4..f9ededb72 100644 --- a/agent/call-scd.c +++ b/agent/call-scd.c @@ -870,7 +870,8 @@ agent_card_pksign (ctrl_t ctrl, membuf_data_cb, &data, inq_needpin, &inqparm, NULL, NULL); - if (inqparm.any_inq_seen && gpg_err_code(rc) == GPG_ERR_CANCELED) + if (inqparm.any_inq_seen && (gpg_err_code(rc) == GPG_ERR_CANCELED || + gpg_err_code(rc) == GPG_ERR_ASS_CANCELED)) rc = cancel_inquire (ctrl, rc); if (rc) @@ -949,7 +950,8 @@ agent_card_pkdecrypt (ctrl_t ctrl, membuf_data_cb, &data, inq_needpin, &inqparm, NULL, NULL); - if (inqparm.any_inq_seen && gpg_err_code(rc) == GPG_ERR_CANCELED) + if (inqparm.any_inq_seen && (gpg_err_code(rc) == GPG_ERR_CANCELED || + gpg_err_code(rc) == GPG_ERR_ASS_CANCELED)) rc = cancel_inquire (ctrl, rc); if (rc) |