mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Enhanced --auto-key-locate.
This commit is contained in:
parent
7707a7e5f8
commit
97ec9aac2b
14 changed files with 226 additions and 96 deletions
|
@ -824,8 +824,9 @@ build_pk_list( strlist_t rcpts, PK_LIST *ret_pk_list, unsigned int use )
|
|||
pk->req_usage = use;
|
||||
|
||||
/* We explicitly allow encrypt-to to an disabled key; thus
|
||||
we pass 1 as last argument. */
|
||||
if ( (rc = get_pubkey_byname ( pk, rov->d, NULL, NULL, 1 )) )
|
||||
we pass 1for the second last argument and 1 as the last
|
||||
argument to disable AKL. */
|
||||
if ( (rc = get_pubkey_byname (pk, rov->d, NULL, NULL, 1, 1)) )
|
||||
{
|
||||
free_public_key ( pk ); pk = NULL;
|
||||
log_error (_("%s: skipped: %s\n"), rov->d, g10_errstr(rc) );
|
||||
|
@ -964,7 +965,7 @@ build_pk_list( strlist_t rcpts, PK_LIST *ret_pk_list, unsigned int use )
|
|||
free_public_key (pk);
|
||||
pk = xmalloc_clear( sizeof *pk );
|
||||
pk->req_usage = use;
|
||||
rc = get_pubkey_byname( pk, answer, NULL, NULL, 0 );
|
||||
rc = get_pubkey_byname( pk, answer, NULL, NULL, 0, 0 );
|
||||
if (rc)
|
||||
tty_printf(_("No such user ID.\n"));
|
||||
else if ( !(rc=openpgp_pk_test_algo2 (pk->pubkey_algo, use)) )
|
||||
|
@ -1037,8 +1038,8 @@ build_pk_list( strlist_t rcpts, PK_LIST *ret_pk_list, unsigned int use )
|
|||
pk->req_usage = use;
|
||||
|
||||
/* The default recipient is allowed to be disabled; thus pass 1
|
||||
as last argument. */
|
||||
rc = get_pubkey_byname (pk, def_rec, NULL, NULL, 1);
|
||||
as second last argument. We also don't want an AKL. */
|
||||
rc = get_pubkey_byname (pk, def_rec, NULL, NULL, 1, 1);
|
||||
if (rc)
|
||||
log_error(_("unknown default recipient \"%s\"\n"), def_rec );
|
||||
else if ( !(rc=openpgp_pk_test_algo2(pk->pubkey_algo, use)) )
|
||||
|
@ -1078,7 +1079,7 @@ build_pk_list( strlist_t rcpts, PK_LIST *ret_pk_list, unsigned int use )
|
|||
|
||||
pk = xmalloc_clear( sizeof *pk );
|
||||
pk->req_usage = use;
|
||||
if ( (rc = get_pubkey_byname( pk, remusr->d, NULL, NULL, 0 )) )
|
||||
if ( (rc = get_pubkey_byname( pk, remusr->d, NULL, NULL, 0, 0 )) )
|
||||
{
|
||||
/* Key not found or other error. */
|
||||
free_public_key( pk ); pk = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue