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

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>
This commit is contained in:
NIIBE Yutaka 2020-11-19 13:03:29 +09:00
parent d66fb3aa53
commit e45455d302

View File

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