mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* configure.ac: Require libksba 0.9.11.
sm/ * call-dirmngr.c (inq_certificate): Add new inquire SENDCERT_SKI. * certlist.c (gpgsm_find_cert): Add new arg KEYID and implement this filter. Changed all callers. * certchain.c (find_up_search_by_keyid): New helper. (find_up): Also try using the AKI.keyIdentifier. (find_up_external): Ditto.
This commit is contained in:
parent
00853b8a1a
commit
eff62d82bf
17 changed files with 302 additions and 41 deletions
|
@ -1,5 +1,5 @@
|
|||
/* call-dirmngr.c - communication with the dromngr
|
||||
* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
|
@ -266,11 +266,25 @@ inq_certificate (void *opaque, const char *line)
|
|||
const unsigned char *der;
|
||||
size_t derlen;
|
||||
int issuer_mode = 0;
|
||||
ksba_sexp_t ski = NULL;
|
||||
|
||||
if (!strncmp (line, "SENDCERT", 8) && (line[8] == ' ' || !line[8]))
|
||||
{
|
||||
line += 8;
|
||||
}
|
||||
else if (!strncmp (line, "SENDCERT_SKI", 12) && (line[12]==' ' || !line[12]))
|
||||
{
|
||||
size_t n;
|
||||
|
||||
/* Send a certificate where a sourceKeyidentifier is included. */
|
||||
line += 12;
|
||||
while (*line == ' ')
|
||||
line++;
|
||||
ski = make_simple_sexp_from_hexstr (line, &n);
|
||||
line += n;
|
||||
while (*line == ' ')
|
||||
line++;
|
||||
}
|
||||
else if (!strncmp (line, "SENDISSUERCERT", 14)
|
||||
&& (line[14] == ' ' || !line[14]))
|
||||
{
|
||||
|
@ -304,7 +318,7 @@ inq_certificate (void *opaque, const char *line)
|
|||
ksba_cert_t cert;
|
||||
|
||||
|
||||
err = gpgsm_find_cert (line, &cert);
|
||||
err = gpgsm_find_cert (line, ski, &cert);
|
||||
if (err)
|
||||
{
|
||||
log_error ("certificate not found: %s\n", gpg_strerror (err));
|
||||
|
@ -321,6 +335,7 @@ inq_certificate (void *opaque, const char *line)
|
|||
}
|
||||
}
|
||||
|
||||
xfree (ski);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -717,7 +732,7 @@ run_command_inq_cb (void *opaque, const char *line)
|
|||
if (!*line)
|
||||
return ASSUAN_Inquire_Error;
|
||||
|
||||
err = gpgsm_find_cert (line, &cert);
|
||||
err = gpgsm_find_cert (line, NULL, &cert);
|
||||
if (err)
|
||||
{
|
||||
log_error ("certificate not found: %s\n", gpg_strerror (err));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue