aboutsummaryrefslogtreecommitdiffstats
path: root/g10/call-agent.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-09-01 12:49:05 +0000
committerWerner Koch <[email protected]>2010-09-01 12:49:05 +0000
commita0b9ebfb7dcc61c2893c48903c87a4cceb2a6ed5 (patch)
tree8f7613375b4b5c7db07938eeacffda72a39ddcb7 /g10/call-agent.c
parents/CACHE_MODE_IMPGEN/CACHE_MODE_NONCE/. (diff)
downloadgnupg-a0b9ebfb7dcc61c2893c48903c87a4cceb2a6ed5.tar.gz
gnupg-a0b9ebfb7dcc61c2893c48903c87a4cceb2a6ed5.zip
Even less prompts for a new key now.
Diffstat (limited to 'g10/call-agent.c')
-rw-r--r--g10/call-agent.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c
index 2ffa28b69..90fa40e1d 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -1549,9 +1549,11 @@ agent_genkey (ctrl_t ctrl, char **cache_nonce_addr,
the hex string KEYGRIP. DESC is a description of the key to be
displayed if the agent needs to ask for the PIN. DIGEST and
DIGESTLEN is the hash value to sign and DIGESTALGO the algorithm id
- used to compute the digest. */
+ used to compute the digest. If CACHE_NONCE is used the agent is
+ advised to firts try a passphrase associated with that nonce. */
gpg_error_t
-agent_pksign (ctrl_t ctrl, const char *keygrip, const char *desc,
+agent_pksign (ctrl_t ctrl, const char *cache_nonce,
+ const char *keygrip, const char *desc,
unsigned char *digest, size_t digestlen, int digestalgo,
gcry_sexp_t *r_sigval)
{
@@ -1598,7 +1600,11 @@ agent_pksign (ctrl_t ctrl, const char *keygrip, const char *desc,
return err;
init_membuf (&data, 1024);
- err = assuan_transact (agent_ctx, "PKSIGN",
+
+ snprintf (line, sizeof line, "PKSIGN%s%s",
+ cache_nonce? " -- ":"",
+ cache_nonce? cache_nonce:"");
+ err = assuan_transact (agent_ctx, line,
membuf_data_cb, &data, default_inq_cb, ctrl,
NULL, NULL);
if (err)