[git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-36-gcf748e8
by Ben Kibbey
cvs at cvs.gnupg.org
Thu Jan 26 03:16:27 CET 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, master has been updated
via cf748e8736b984194345bfd74887b35d3d23fa37 (commit)
via 3da10eefcb09a520f11e4fae7f59a33f80ffba69 (commit)
from 001352077cdc7e402421c77328bea1a052005673 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cf748e8736b984194345bfd74887b35d3d23fa37
Author: Ben Kibbey <bjk at luxsci.net>
Date: Wed Jan 25 19:16:33 2012 -0500
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.
diff --git a/agent/divert-scd.c b/agent/divert-scd.c
index f176a6b..5926424 100644
--- a/agent/divert-scd.c
+++ b/agent/divert-scd.c
@@ -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);
}
}
commit 3da10eefcb09a520f11e4fae7f59a33f80ffba69
Author: Ben Kibbey <bjk at luxsci.net>
Date: Wed Jan 25 18:14:51 2012 -0500
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.
diff --git a/agent/call-scd.c b/agent/call-scd.c
index ccdb637..f9ededb 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)
-----------------------------------------------------------------------
Summary of changes:
agent/call-scd.c | 6 ++++--
agent/divert-scd.c | 4 ++++
2 files changed, 8 insertions(+), 2 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list