[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnupg-commit-watchers
Subject:    [svn] GnuPG -  r4649 - branches/STABLE-BRANCH-1-4/cipher
From:       cvs () trithemius ! gnupg ! org (svn author wk)
Date:       2007-12-11 17:14:06
Message-ID: E1J28PB-0008AH-Px () trithemius ! gnupg ! org
[Download RAW message or body]

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

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


_______________________________________________
Gnupg-commits mailing list
Gnupg-commits@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic