scd:openpgp: Public keys should be available for check_keyidstr.

* scd/app-openpgp.c (check_keyidstr): Call get_public_key.

--

GnuPG-bug-id: 5065
Fixes-commit: 1049f06c6d
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-11-19 13:49:08 +09:00
parent 126fa09f8b
commit 84020385be
1 changed files with 5 additions and 0 deletions

View File

@ -4392,10 +4392,15 @@ check_keyidstr (app_t app, const char *keyidstr, int keyno, int *r_use_auth)
const char *s;
int n;
const char *fpr = NULL;
int i;
if (r_use_auth)
*r_use_auth = 0;
/* Make sure we have load the public keys. */
for (i = 0; i < 3; i++)
get_public_key (app, i);
if (strlen (keyidstr) < 32)
return gpg_error (GPG_ERR_INV_ID);
else