aboutsummaryrefslogtreecommitdiffstats
path: root/g10/pkclist.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2008-04-08 11:04:16 +0000
committerWerner Koch <[email protected]>2008-04-08 11:04:16 +0000
commit97ec9aac2b306bd87f77c2a50813376f557e3d58 (patch)
treebd494a6312edfb8037daa9428be6bc249cbc7480 /g10/pkclist.c
parentAllow requesting TCP queries. (diff)
downloadgnupg-97ec9aac2b306bd87f77c2a50813376f557e3d58.tar.gz
gnupg-97ec9aac2b306bd87f77c2a50813376f557e3d58.zip
Enhanced --auto-key-locate.
Diffstat (limited to 'g10/pkclist.c')
-rw-r--r--g10/pkclist.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/g10/pkclist.c b/g10/pkclist.c
index cb50ae29b..dbabdab83 100644
--- a/g10/pkclist.c
+++ b/g10/pkclist.c
@@ -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;