diff options
author | Werner Koch <[email protected]> | 2010-10-13 15:57:08 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2010-10-13 15:57:08 +0000 |
commit | 54591341a417ca769b2219a9b2f7683f11a74718 (patch) | |
tree | d4cd49932dec93aa9e20e1933ad16ba897965c46 /agent/findkey.c | |
parent | Describe %v and %V. (diff) | |
download | gnupg-54591341a417ca769b2219a9b2f7683f11a74718.tar.gz gnupg-54591341a417ca769b2219a9b2f7683f11a74718.zip |
More agent support for gpg.
Diffstat (limited to 'agent/findkey.c')
-rw-r--r-- | agent/findkey.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/agent/findkey.c b/agent/findkey.c index 63b24a5d5..611a44142 100644 --- a/agent/findkey.c +++ b/agent/findkey.c @@ -169,7 +169,8 @@ try_unprotect_cb (struct pin_entry_info_s *pi) _("I'll change it later"), 0); if (!err) arg->change_required = 1; - else if (gpg_err_code (err) == GPG_ERR_CANCELED) + else if (gpg_err_code (err) == GPG_ERR_CANCELED + || gpg_err_code (err) == GPG_ERR_FULLY_CANCELED) err = 0; } xfree (desc); @@ -290,7 +291,6 @@ unprotect (ctrl_t ctrl, const char *cache_nonce, const char *desc_text, unsigned char *result; size_t resultlen; char hexgrip[40+1]; - int fully_canceled; if (r_passphrase) *r_passphrase = NULL; @@ -383,9 +383,7 @@ unprotect (ctrl_t ctrl, const char *cache_nonce, const char *desc_text, arg.change_required = 0; pi->check_cb_arg = &arg; - rc = agent_askpin (ctrl, desc_text, NULL, NULL, pi, &fully_canceled); - if (gpg_err_code (rc) == GPG_ERR_CANCELED && fully_canceled) - rc = gpg_err_make (gpg_err_source (rc), GPG_ERR_FULLY_CANCELED); + rc = agent_askpin (ctrl, desc_text, NULL, NULL, pi); if (!rc) { assert (arg.unprotected_key); |