diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2020-12-08 05:20:29 +0100 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2020-12-08 05:20:29 +0100 |
commit | cbb0e069f55bc45037bbd69d54ce23dae2af2ac6 (patch) | |
tree | a462ac78665990a0b7b9df35ecd864e365341f6d /agent/pksign.c | |
parent | gpg: Make quick-gen-key with algo "card" work for keys without keytime (diff) | |
download | gnupg2-cbb0e069f55bc45037bbd69d54ce23dae2af2ac6.tar.xz gnupg2-cbb0e069f55bc45037bbd69d54ce23dae2af2ac6.zip |
agent: Allow pksign operation with card but no file.
* agent/pksign.c (agent_pksign_do): Add support with no file.
--
GnuPG-bug-id: 5166
Signed-off-by: Ingo Klöcker <dev@ingo-kloecker.de>
Diffstat (limited to 'agent/pksign.c')
-rw-r--r-- | agent/pksign.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/agent/pksign.c b/agent/pksign.c index c94c1a197..d9ffe6019 100644 --- a/agent/pksign.c +++ b/agent/pksign.c @@ -324,8 +324,8 @@ agent_pksign_do (ctrl_t ctrl, const char *cache_nonce, log_error ("failed to read the secret key\n"); goto leave; } - - algo = get_pk_algo_from_key (s_skey); + else + algo = get_pk_algo_from_key (s_skey); if (shadow_info || no_shadow_info) { @@ -374,6 +374,8 @@ agent_pksign_do (ctrl_t ctrl, const char *cache_nonce, if (keyref) agent_write_shadow_key (ctrl->keygrip, serialno, keyref, pkbuf, 0); + algo = get_pk_algo_from_key (s_pkey); + xfree (serialno); xfree (pkbuf); xfree (keyref); |