aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/call-agent.c5
-rw-r--r--g10/call-agent.h2
-rw-r--r--g10/import.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c
index cb965e9ad..17290ec1a 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -1998,7 +1998,7 @@ inq_import_key_parms (void *opaque, const char *line)
/* Call the agent to import a key into the agent. */
gpg_error_t
agent_import_key (ctrl_t ctrl, const char *desc, char **cache_nonce_addr,
- const void *key, size_t keylen)
+ const void *key, size_t keylen, int unattended)
{
gpg_error_t err;
struct import_key_parm_s parm;
@@ -2028,7 +2028,8 @@ agent_import_key (ctrl_t ctrl, const char *desc, char **cache_nonce_addr,
parm.key = key;
parm.keylen = keylen;
- snprintf (line, sizeof line, "IMPORT_KEY%s%s",
+ snprintf (line, sizeof line, "IMPORT_KEY%s%s%s",
+ unattended? " --unattended":"",
cache_nonce_addr && *cache_nonce_addr? " ":"",
cache_nonce_addr && *cache_nonce_addr? *cache_nonce_addr:"");
cn_parm.cache_nonce_addr = cache_nonce_addr;
diff --git a/g10/call-agent.h b/g10/call-agent.h
index ab1d41a53..cce8304bc 100644
--- a/g10/call-agent.h
+++ b/g10/call-agent.h
@@ -177,7 +177,7 @@ gpg_error_t agent_keywrap_key (ctrl_t ctrl, int forexport,
/* Send a key to the agent. */
gpg_error_t agent_import_key (ctrl_t ctrl, const char *desc,
char **cache_nonce_addr,
- const void *key, size_t keylen);
+ const void *key, size_t keylen, int unattended);
/* Receive a key from the agent. */
gpg_error_t agent_export_key (ctrl_t ctrl, const char *keygrip,
diff --git a/g10/import.c b/g10/import.c
index a57b32e3f..3846c213f 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -1432,7 +1432,7 @@ transfer_secret_keys (ctrl_t ctrl, struct stats_s *stats, kbnode_t sec_keyblock)
{
char *desc = gpg_format_keydesc (pk, 1, 1);
err = agent_import_key (ctrl, desc, &cache_nonce,
- wrappedkey, wrappedkeylen);
+ wrappedkey, wrappedkeylen, opt.batch);
xfree (desc);
}
if (!err)