diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2020-11-19 07:40:16 +0100 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2020-11-19 07:44:59 +0100 |
commit | 8ddadbbdbbe20b9e87eb2bfa142577e26dae297e (patch) | |
tree | 319bb883992dc4a7a83f346e02569b7945305c86 /agent | |
parent | gpg: Fix --card-edit command. (diff) | |
download | gnupg2-8ddadbbdbbe20b9e87eb2bfa142577e26dae297e.tar.xz gnupg2-8ddadbbdbbe20b9e87eb2bfa142577e26dae297e.zip |
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>
Diffstat (limited to 'agent')
-rw-r--r-- | agent/command.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/agent/command.c b/agent/command.c index e21dcdac4..9c5f7b03b 100644 --- a/agent/command.c +++ b/agent/command.c @@ -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) |