1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00

* pkclist.c (build_pk_list): Do not allow an empty PK list in interactive

mode.

* getkey.c (get_seckey_byname2): Disallow use of sign+encrypt Elgamal
keys.
This commit is contained in:
David Shaw 2003-11-27 14:47:00 +00:00
parent 20d83b24ee
commit 5473ac9deb
3 changed files with 12 additions and 4 deletions

View File

@ -1,10 +1,13 @@
2003-11-27 David Shaw <dshaw@jabberwocky.com> 2003-11-27 David Shaw <dshaw@jabberwocky.com>
* pkclist.c (build_pk_list): Do not allow an empty PK list in
interactive mode.
* keygen.c (ask_algo): Remove ability to generate Elgamal * keygen.c (ask_algo): Remove ability to generate Elgamal
sign+encrypt keys. sign+encrypt keys.
* getkey.c (merge_selfsigs_main, merge_selfsigs_subkey): Disallow * getkey.c (merge_selfsigs_main, merge_selfsigs_subkey,
use of sign+encrypt Elgamal keys. get_seckey_byname2): Disallow use of sign+encrypt Elgamal keys.
2003-11-20 David Shaw <dshaw@jabberwocky.com> 2003-11-20 David Shaw <dshaw@jabberwocky.com>

View File

@ -1055,7 +1055,11 @@ get_seckey_byname2( GETKEY_CTX *retctx,
ctx.items[0].mode = KEYDB_SEARCH_MODE_FIRST; ctx.items[0].mode = KEYDB_SEARCH_MODE_FIRST;
rc = lookup( &ctx, &kb, 1 ); rc = lookup( &ctx, &kb, 1 );
if (!rc && sk ) if (!rc && sk )
sk_from_block ( &ctx, sk, kb ); {
sk_from_block ( &ctx, sk, kb );
if(sk->pubkey_algo==PUBKEY_ALGO_ELGAMAL)
rc=G10ERR_UNU_SECKEY;
}
release_kbnode ( kb ); release_kbnode ( kb );
get_seckey_end( &ctx ); get_seckey_end( &ctx );
} }

View File

@ -880,7 +880,8 @@ build_pk_list( STRLIST rcpts, PK_LIST *ret_pk_list, unsigned use )
char *answer=NULL; char *answer=NULL;
STRLIST backlog=NULL; STRLIST backlog=NULL;
any_recipients = 1; if(pk_list)
any_recipients = 1;
def_rec = default_recipient(); def_rec = default_recipient();
have_def_rec = !!def_rec; have_def_rec = !!def_rec;
if( !have_def_rec ) if( !have_def_rec )