1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* 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.
This commit is contained in:
Werner Koch 2003-11-27 14:47:59 +00:00
parent 5473ac9deb
commit 996d61bcc6
3 changed files with 43 additions and 27 deletions

View file

@ -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 ) {