Home GnuPG
Diffusion GnuPG 1049f06c6d2e

scd:openpgp: Allow keygrip to be used to reference a key

Description

scd:openpgp: Allow keygrip to be used to reference a key

* scd/app-openpgp.c (struct app_local_s): Add keygrip_str.
(store_keygrip): New.
(read_public_key): Store the keygrip.
(get_public_key): Sitto.
(send_keypair_info): USe the stored keygrip.
(check_keyidstr): New.  Factored out from other functions and
extended.
(do_sign): Use check_keyidstr.
(do_auth): Ditto.
(do_decipher): Ditto.
(do_check_pin): Ditto.

This code is a backport of commits:

b0f0791e4ade845b2a0e2a94dbda4f3bf1ceb039
cd: Factor out a function to check keyidstr.

4c4999b8185ace55eb5f3a6fa7d3dc0a77267b63
scd:openpgp: Allow PKSIGN with keygrip also for OPENPGP.3.

e769609cd3c12d2e26955538399172016f78d2d4
scd: Allow KEYGRIP as KEYIDSTR.

  • Co-authored-by: NIIBE Yutaka <gniibe@fsij.org>
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Nov 16 2020, 5:05 PM
Parents
rG5d98f95aa90c: gpg: Provide better diagnostic for replaced card keys.
Branches
Unknown
Tags
Unknown