diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2020-11-19 05:03:29 +0100 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2020-11-19 05:03:29 +0100 |
commit | e45455d3020ca8f21c54112b6dfb1cc9bd3f2623 (patch) | |
tree | 581eb31ade46df88d491d3c0a73b9ebc7a58739a /g10/card-util.c | |
parent | build: Update to newer autoconf constructs. (diff) | |
download | gnupg2-e45455d3020ca8f21c54112b6dfb1cc9bd3f2623.tar.xz gnupg2-e45455d3020ca8f21c54112b6dfb1cc9bd3f2623.zip |
gpg: Fix --card-edit command.
* g10/card-util.c (get_info_for_key_operation): Revert the change.
--
Fixes-commit: 157f1de64e437cecd75335e9f4077ba9835e3da0
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to '')
-rw-r--r-- | g10/card-util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/card-util.c b/g10/card-util.c index 74d49aaf2..4da4a53c8 100644 --- a/g10/card-util.c +++ b/g10/card-util.c @@ -1257,7 +1257,8 @@ get_info_for_key_operation (struct agent_card_info_s *info) memset (info, 0, sizeof *info); rc = agent_scd_getattr ("SERIALNO", info); - if (rc || !info->apptype || strcmp (info->apptype, "openpgp")) + if (rc || !info->serialno || strncmp (info->serialno, "D27600012401", 12) + || strlen (info->serialno) != 32 ) { log_error (_("key operation not possible: %s\n"), rc ? gpg_strerror (rc) : _("not an OpenPGP card")); |