mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Import/export of pkcs#12 now uses the gpg-agent directly.
Removed duplicated code (percent unescaping).
This commit is contained in:
parent
98e1a75e20
commit
f8b4cd7650
29 changed files with 716 additions and 369 deletions
12
sm/export.c
12
sm/export.c
|
@ -574,13 +574,14 @@ popen_protect_tool (ctrl_t ctrl, const char *pgmname,
|
|||
const char *prompt, const char *keygrip,
|
||||
pid_t *pid)
|
||||
{
|
||||
const char *argv[20];
|
||||
const char *argv[22];
|
||||
int i=0;
|
||||
|
||||
/* Make sure that the agent is running so that the protect tool is
|
||||
able to ask for a passphrase. This has only an effect under W32
|
||||
where the agent is started on demand; sending a NOP does not harm
|
||||
on other platforms. */
|
||||
on other platforms. This is not really necessary anymore because
|
||||
the protect tool does this now by itself; it does not harm either.*/
|
||||
gpgsm_agent_send_nop (ctrl);
|
||||
|
||||
argv[i++] = "--homedir";
|
||||
|
@ -595,13 +596,18 @@ popen_protect_tool (ctrl_t ctrl, const char *pgmname,
|
|||
argv[i++] = "--p12-charset";
|
||||
argv[i++] = opt.p12_charset;
|
||||
}
|
||||
if (opt.agent_program)
|
||||
{
|
||||
argv[i++] = "--agent-program";
|
||||
argv[i++] = opt.agent_program;
|
||||
}
|
||||
argv[i++] = "--",
|
||||
argv[i++] = keygrip,
|
||||
argv[i] = NULL;
|
||||
assert (i < sizeof argv);
|
||||
|
||||
return gnupg_spawn_process (pgmname, argv, infile, outfile,
|
||||
setup_pinentry_env, 128,
|
||||
setup_pinentry_env, (128|64),
|
||||
statusfile, pid);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue