diff options
Diffstat (limited to 'g10/pkclist.c')
-rw-r--r-- | g10/pkclist.c | 13 |
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; |