aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/pubkey.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2003-11-27 14:47:59 +0000
committerWerner Koch <[email protected]>2003-11-27 14:47:59 +0000
commit996d61bcc6257249327faa4eba00f2f311c73035 (patch)
treec431fefee114bf25888d374012e44e8137724646 /cipher/pubkey.c
parent* pkclist.c (build_pk_list): Do not allow an empty PK list in interactive (diff)
downloadgnupg-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.c3
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 ) {