aboutsummaryrefslogtreecommitdiffstats
path: root/agent/findkey.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2003-01-09 12:59:25 +0000
committerWerner Koch <[email protected]>2003-01-09 12:59:25 +0000
commitc13b76ca6a495cda6e51934a7788f48ca6f3bb0e (patch)
treed52174e8d500d7db90181bf71624d69d0c6836c5 /agent/findkey.c
parent* keygen.c (keygen_set_std_prefs): Warn when setting an IDEA preference (diff)
downloadgnupg-c13b76ca6a495cda6e51934a7788f48ca6f3bb0e.tar.gz
gnupg-c13b76ca6a495cda6e51934a7788f48ca6f3bb0e.zip
Updated from latest NewPG project
Diffstat (limited to '')
-rw-r--r--agent/findkey.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/agent/findkey.c b/agent/findkey.c
index 8ec230fa0..96a1f360c 100644
--- a/agent/findkey.c
+++ b/agent/findkey.c
@@ -131,9 +131,10 @@ try_unprotect_cb (struct pin_entry_info_s *pi)
/* Unprotect the canconical encoded S-expression key in KEYBUF. GRIP
should be the hex encoded keygrip of that key to be used with the
- cahing mechanism. */
+ caching mechanism. */
static int
-unprotect (unsigned char **keybuf, const unsigned char *grip, int ignore_cache)
+unprotect (CTRL ctrl,
+ unsigned char **keybuf, const unsigned char *grip, int ignore_cache)
{
struct pin_entry_info_s *pi;
struct try_unprotect_arg_s arg;
@@ -176,7 +177,7 @@ unprotect (unsigned char **keybuf, const unsigned char *grip, int ignore_cache)
arg.unprotected_key = NULL;
pi->check_cb_arg = &arg;
- rc = agent_askpin (NULL, pi);
+ rc = agent_askpin (ctrl, NULL, pi);
if (!rc)
{
assert (arg.unprotected_key);
@@ -197,7 +198,8 @@ unprotect (unsigned char **keybuf, const unsigned char *grip, int ignore_cache)
With IGNORE_CACHE passed as true the passphrase is not taken from
the cache.*/
GCRY_SEXP
-agent_key_from_file (const unsigned char *grip, unsigned char **shadow_info,
+agent_key_from_file (CTRL ctrl,
+ const unsigned char *grip, unsigned char **shadow_info,
int ignore_cache)
{
int i, rc;
@@ -271,7 +273,7 @@ agent_key_from_file (const unsigned char *grip, unsigned char **shadow_info,
case PRIVATE_KEY_CLEAR:
break; /* no unprotection needed */
case PRIVATE_KEY_PROTECTED:
- rc = unprotect (&buf, grip, ignore_cache);
+ rc = unprotect (ctrl, &buf, grip, ignore_cache);
if (rc)
log_error ("failed to unprotect the secret key: %s\n",
gnupg_strerror (rc));