mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* gpgsm.c: New option --auto-issuer-key-retrieve.
* certpath.c (find_up): Try to retrieve an issuer key from an external source and from the ephemeral key DB. (find_up_store_certs_cb): New. * keydb.c (keydb_set_ephemeral): Does now return the old state. Call the backend only when required. * call-dirmngr.c (start_dirmngr): Use GNUPG_DEFAULT_DIRMNGR. (lookup_status_cb): Issue status only when CTRL is not NULL. (gpgsm_dirmngr_lookup): Document that CTRL is optional. * call-agent.c (start_agent): Use GNUPG_DEFAULT_AGENT.
This commit is contained in:
parent
2082905525
commit
df58e024e7
8 changed files with 214 additions and 23 deletions
29
sm/keydb.c
29
sm/keydb.c
|
@ -59,7 +59,7 @@ struct keydb_handle {
|
|||
int locked;
|
||||
int found;
|
||||
int current;
|
||||
int ephemeral;
|
||||
int is_ephemeral;
|
||||
int used; /* items in active */
|
||||
struct resource_item active[MAX_KEYDB_RESOURCES];
|
||||
};
|
||||
|
@ -332,27 +332,34 @@ keydb_get_resource_name (KEYDB_HANDLE hd)
|
|||
return s? s: "";
|
||||
}
|
||||
|
||||
/* Switch the handle into ephemeral mode and return the orginal value. */
|
||||
int
|
||||
keydb_set_ephemeral (KEYDB_HANDLE hd, int yes)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!hd)
|
||||
return GNUPG_Invalid_Value;
|
||||
return 0;
|
||||
|
||||
for (i=0; i < hd->used; i++)
|
||||
yes = !!yes;
|
||||
if (hd->is_ephemeral != yes)
|
||||
{
|
||||
switch (hd->active[i].type)
|
||||
for (i=0; i < hd->used; i++)
|
||||
{
|
||||
case KEYDB_RESOURCE_TYPE_NONE:
|
||||
break;
|
||||
case KEYDB_RESOURCE_TYPE_KEYBOX:
|
||||
keybox_set_ephemeral (hd->active[i].u.kr, yes);
|
||||
break;
|
||||
switch (hd->active[i].type)
|
||||
{
|
||||
case KEYDB_RESOURCE_TYPE_NONE:
|
||||
break;
|
||||
case KEYDB_RESOURCE_TYPE_KEYBOX:
|
||||
keybox_set_ephemeral (hd->active[i].u.kr, yes);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
i = hd->is_ephemeral;
|
||||
hd->is_ephemeral = yes;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue