gpg: Fix --card-edit command.

* g10/card-util.c (get_info_for_key_operation): Revert the change.

--

Fixes-commit: 157f1de64e
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
1 changed files with 2 additions and 1 deletions

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