mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* trustdb.h, trustdb.c (register_trusted_keyid): New. Adds a keyid to the
list of ultimately trusted keys. * keygen.c (do_generate_keypair): Use it here so that the ultimate ownertrust happens before the trustdb (might be) rebuilt. Also fix an error where the newly generated pk is thought to be a subkey by the trustdb. * g10.c (main): Fix --export-all do actually do something different than --export. * pkclist.c (build_pk_list): Show all recipients rather than showing each recipient as they are added. * mainproc.c (proc_symkey_enc, proc_encrypted): Keep a count of the number of passphrases that can decrypt a symmetric or mixed symmetric/pk message and include it in the list of keys shown to the user.
This commit is contained in:
parent
d3cd27c3b6
commit
5c37fd90bf
7 changed files with 94 additions and 44 deletions
|
@ -895,12 +895,41 @@ build_pk_list( STRLIST rcpts, PK_LIST *ret_pk_list, unsigned use )
|
|||
else if(backlog) {
|
||||
answer=pop_strlist(&backlog);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
PK_LIST iter;
|
||||
|
||||
tty_printf("\n");
|
||||
tty_printf(_("Current recipients:\n"));
|
||||
for(iter=pk_list;iter;iter=iter->next)
|
||||
{
|
||||
u32 keyid[2];
|
||||
|
||||
keyid_from_pk(iter->pk,keyid);
|
||||
tty_printf("%4u%c/%08lX %s \"",
|
||||
nbits_from_pk(iter->pk),
|
||||
pubkey_letter(iter->pk->pubkey_algo),
|
||||
(ulong)keyid[1],
|
||||
datestr_from_pk(iter->pk));
|
||||
|
||||
if(iter->pk->user_id)
|
||||
tty_print_utf8_string(iter->pk->user_id->name,
|
||||
iter->pk->user_id->len);
|
||||
else
|
||||
{
|
||||
size_t n;
|
||||
char *p = get_user_id( keyid, &n );
|
||||
tty_print_utf8_string( p, n );
|
||||
m_free(p);
|
||||
}
|
||||
tty_printf("\"\n");
|
||||
}
|
||||
|
||||
answer = cpr_get_utf8("pklist.user_id.enter",
|
||||
_("\nEnter the user ID. End with an empty line: "));
|
||||
trim_spaces(answer);
|
||||
cpr_kill_prompt();
|
||||
}
|
||||
}
|
||||
if( !answer || !*answer ) {
|
||||
m_free(answer);
|
||||
break;
|
||||
|
@ -947,26 +976,6 @@ build_pk_list( STRLIST rcpts, PK_LIST *ret_pk_list, unsigned use )
|
|||
}
|
||||
else {
|
||||
PK_LIST r;
|
||||
u32 keyid[2];
|
||||
|
||||
keyid_from_pk( pk, keyid);
|
||||
tty_printf("Added %4u%c/%08lX %s \"",
|
||||
nbits_from_pk( pk ),
|
||||
pubkey_letter( pk->pubkey_algo ),
|
||||
(ulong)keyid[1],
|
||||
datestr_from_pk( pk ) );
|
||||
if(pk->user_id)
|
||||
tty_print_utf8_string(pk->user_id->name,
|
||||
pk->user_id->len);
|
||||
else
|
||||
{
|
||||
size_t n;
|
||||
char *p = get_user_id( keyid, &n );
|
||||
tty_print_utf8_string( p, n );
|
||||
m_free(p);
|
||||
}
|
||||
tty_printf("\"\n");
|
||||
|
||||
r = m_alloc( sizeof *r );
|
||||
r->pk = pk; pk = NULL;
|
||||
r->next = pk_list;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue