1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-08 23:37:47 +02:00

Allow decryption using type 20 key.

This commit is contained in:
Werner Koch 2007-12-11 17:14:05 +00:00
parent 7d67e4a497
commit a45ad0eba1
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2007-12-11 Werner Koch <wk@g10code.com>
* pubkey.c (check_pubkey_algo2): Hack to allow decryption using an
type 20 Elgamal key.
2007-11-29 David Shaw <dshaw@jabberwocky.com>
* camellia-glue.c (camellia_get_info), cipher.c

View File

@ -272,6 +272,12 @@ check_pubkey_algo2( int algo, unsigned use )
{
int i;
/* Map type 20 Elgamal algorithm to type 16 if it is used for
decryption. This allows to use legacy type 20 Elgamal keys for
decryption. */
if (algo == PUBKEY_ALGO_ELGAMAL && use == PUBKEY_USAGE_ENC)
algo = PUBKEY_ALGO_ELGAMAL_E;
do {
for(i=0; pubkey_table[i].name; i++ )
if( pubkey_table[i].algo == algo ) {