agent: Fix creating shadow key on card key generation.

* agent/command.c (cmd_readkey): Fix handling --card option.

--

Fixes-commit: 9c719c9c1f
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-11-19 15:40:16 +09:00
parent e45455d302
commit 8ddadbbdbb
1 changed files with 3 additions and 3 deletions

View File

@ -1088,17 +1088,17 @@ cmd_readkey (assuan_context_t ctx, char *line)
unsigned char *pkbuf = NULL;
char *serialno = NULL;
size_t pkbuflen;
const char *opt_card;
int opt_card;
if (ctrl->restricted)
return leave_cmd (ctx, gpg_error (GPG_ERR_FORBIDDEN));
opt_card = has_option_name (line, "--card");
opt_card = has_option (line, "--card");
line = skip_options (line);
if (opt_card)
{
const char *keyid = opt_card;
const char *keyid = line;
rc = agent_card_getattr (ctrl, "SERIALNO", &serialno, NULL);
if (rc)