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>
This commit is contained in:
NIIBE Yutaka 2020-12-08 13:20:29 +09:00
parent 255d33d651
commit cbb0e069f5
1 changed files with 4 additions and 2 deletions

View File

@ -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);