diff options
author | Werner Koch <[email protected]> | 2003-11-27 14:47:59 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2003-11-27 14:47:59 +0000 |
commit | 996d61bcc6257249327faa4eba00f2f311c73035 (patch) | |
tree | c431fefee114bf25888d374012e44e8137724646 /cipher/pubkey.c | |
parent | * pkclist.c (build_pk_list): Do not allow an empty PK list in interactive (diff) | |
download | gnupg-996d61bcc6257249327faa4eba00f2f311c73035.tar.gz gnupg-996d61bcc6257249327faa4eba00f2f311c73035.zip |
* pubkey.c (pubkey_sign): Return an error if an ElGamal key is used.
* elgamal.c (gen_k): New arg SMALL_K.
(sign): Use it here with SMALL_K set to false
(do_encrypt): and here with SMALL_K set to true.
Diffstat (limited to 'cipher/pubkey.c')
-rw-r--r-- | cipher/pubkey.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cipher/pubkey.c b/cipher/pubkey.c index 853c518be..3ab84e4a3 100644 --- a/cipher/pubkey.c +++ b/cipher/pubkey.c @@ -518,6 +518,9 @@ pubkey_sign( int algo, MPI *resarr, MPI data, MPI *skey ) log_mpidump(" data:", data ); } + if (is_ELGAMAL (algo)) + return G10ERR_UNU_SECKEY; + do { for(i=0; pubkey_table[i].name; i++ ) if( pubkey_table[i].algo == algo ) { |