[svn] GnuPG - r4649 - branches/STABLE-BRANCH-1-4/cipher
svn author wk
cvs at cvs.gnupg.org
Tue Dec 11 18:14:06 CET 2007
Author: wk
Date: 2007-12-11 18:14:05 +0100 (Tue, 11 Dec 2007)
New Revision: 4649
Modified:
branches/STABLE-BRANCH-1-4/cipher/ChangeLog
branches/STABLE-BRANCH-1-4/cipher/pubkey.c
Log:
Allow decryption using type 20 key.
Modified: branches/STABLE-BRANCH-1-4/cipher/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/cipher/ChangeLog 2007-12-11 13:21:30 UTC (rev 4648)
+++ branches/STABLE-BRANCH-1-4/cipher/ChangeLog 2007-12-11 17:14:05 UTC (rev 4649)
@@ -1,3 +1,8 @@
+2007-12-11 Werner Koch <wk at g10code.com>
+
+ * pubkey.c (check_pubkey_algo2): Hack to allow decryption using an
+ type 20 Elgamal key.
+
2007-11-29 David Shaw <dshaw at jabberwocky.com>
* camellia-glue.c (camellia_get_info), cipher.c
Modified: branches/STABLE-BRANCH-1-4/cipher/pubkey.c
===================================================================
--- branches/STABLE-BRANCH-1-4/cipher/pubkey.c 2007-12-11 13:21:30 UTC (rev 4648)
+++ branches/STABLE-BRANCH-1-4/cipher/pubkey.c 2007-12-11 17:14:05 UTC (rev 4649)
@@ -272,6 +272,12 @@
{
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 ) {
More information about the Gnupg-commits
mailing list