aboutsummaryrefslogtreecommitdiffstats
path: root/sm/call-dirmngr.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-02-26 18:11:27 +0000
committerWerner Koch <[email protected]>2023-02-26 18:14:22 +0000
commit5d96aab27dcf1b1c826c483e39d7265b89736b53 (patch)
tree381520171bb8b13f7aba48c06b2a8b08c6e7e7ec /sm/call-dirmngr.c
parentsm: Fix dirmngr loadcrl for intermediate certs (diff)
downloadgnupg-5d96aab27dcf1b1c826c483e39d7265b89736b53.tar.gz
gnupg-5d96aab27dcf1b1c826c483e39d7265b89736b53.zip
gpgsm: Improve cert lookup callback from dirmngr.
* sm/gpgsm.h (FIND_CERT_ALLOW_AMBIG): New. (FIND_CERT_WITH_EPHEM): New. * sm/certlist.c (gpgsm_find_cert): Replace arg allow_ambiguous by a generic flags arg. Implement the new flag FIND_CERT_WITH_EPHEM. * sm/call-dirmngr.c (inq_certificate): Return also ephemeral marked certs. -- The dirmngr may need to get a certificate from gpgsm's store in the course of verifying a CRL. In some cases the certificate is still marked as epehemeral - this needs to be returned as well. This _may_ also fix GnuPG-bug-id: 4436
Diffstat (limited to 'sm/call-dirmngr.c')
-rw-r--r--sm/call-dirmngr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sm/call-dirmngr.c b/sm/call-dirmngr.c
index da3839349..8e2761b1e 100644
--- a/sm/call-dirmngr.c
+++ b/sm/call-dirmngr.c
@@ -386,8 +386,8 @@ inq_certificate (void *opaque, const char *line)
int err;
ksba_cert_t cert;
-
- err = gpgsm_find_cert (parm->ctrl, line, ski, &cert, 1);
+ err = gpgsm_find_cert (parm->ctrl, line, ski, &cert,
+ FIND_CERT_ALLOW_AMBIG|FIND_CERT_WITH_EPHEM);
if (err)
{
log_error ("certificate not found: %s\n", gpg_strerror (err));
@@ -1014,7 +1014,8 @@ run_command_inq_cb (void *opaque, const char *line)
if (!*line)
return gpg_error (GPG_ERR_ASS_PARAMETER);
- err = gpgsm_find_cert (parm->ctrl, line, NULL, &cert, 1);
+ err = gpgsm_find_cert (parm->ctrl, line, NULL, &cert,
+ FIND_CERT_ALLOW_AMBIG);
if (err)
{
log_error ("certificate not found: %s\n", gpg_strerror (err));