1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

agent: Fix creating shadow key on card key generation.

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

--

Fixes-commit: 9c719c9c1ff34cc06a0fef2bfe29cfd7182753eb
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

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)