mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* call-agent.c (learn_cb): Use log_info instead of log_error on
successful import. * keydb.c (keydb_set_ephemeral): New. (keydb_store_cert): New are ephemeral, changed all callers. * keylist.c (list_external_cb): Store cert as ephemeral. * export.c (gpgsm_export): Kludge to export epehmeral certificates. * gpgsm.c (main): New command --list-external-keys.
This commit is contained in:
parent
031a856a7e
commit
52146943d1
9 changed files with 78 additions and 8 deletions
17
sm/export.c
17
sm/export.c
|
@ -50,6 +50,7 @@ gpgsm_export (CTRL ctrl, STRLIST names, FILE *fp)
|
|||
KsbaCert cert = NULL;
|
||||
int rc=0;
|
||||
int count = 0;
|
||||
int i;
|
||||
|
||||
hd = keydb_new (0);
|
||||
if (!hd)
|
||||
|
@ -91,7 +92,23 @@ gpgsm_export (CTRL ctrl, STRLIST names, FILE *fp)
|
|||
}
|
||||
}
|
||||
|
||||
/* If all specifications are done by fingerprint, we switch to
|
||||
ephemeral mode so that _all_ currently available and matching
|
||||
certificates are exported.
|
||||
|
||||
fixme: we should in this case keep a list of certificates to
|
||||
avoid accidential export of duplicate certificates. */
|
||||
if (names && ndesc)
|
||||
{
|
||||
for (i=0; (i < ndesc
|
||||
&& (desc[i].mode == KEYDB_SEARCH_MODE_FPR
|
||||
|| desc[i].mode == KEYDB_SEARCH_MODE_FPR20
|
||||
|| desc[i].mode == KEYDB_SEARCH_MODE_FPR16)); i++)
|
||||
;
|
||||
if (i == ndesc)
|
||||
keydb_set_ephemeral (hd, 1);
|
||||
}
|
||||
|
||||
while (!(rc = keydb_search (hd, desc, ndesc)))
|
||||
{
|
||||
const unsigned char *image;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue