[svn] GnuPG - r4647 - trunk/g10

svn author wk cvs at cvs.gnupg.org
Tue Dec 11 14:19:41 CET 2007


Author: wk
Date: 2007-12-11 14:19:38 +0100 (Tue, 11 Dec 2007)
New Revision: 4647

Modified:
   trunk/g10/ChangeLog
   trunk/g10/mainproc.c
Log:
Allow decryption using type 20 Elgamal keys.


Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog	2007-12-10 16:44:38 UTC (rev 4646)
+++ trunk/g10/ChangeLog	2007-12-11 13:19:38 UTC (rev 4647)
@@ -1,3 +1,8 @@
+2007-12-11  Werner Koch  <wk at g10code.com>
+
+	* mainproc.c (proc_pubkey_enc): Allo type 20 Elgamal key for
+	decryption.
+
 2007-12-10  Werner Koch  <wk at g10code.com>
 
 	* import.c (auto_create_card_key_stub): Do not clear the entire

Modified: trunk/g10/mainproc.c
===================================================================
--- trunk/g10/mainproc.c	2007-12-10 16:44:38 UTC (rev 4646)
+++ trunk/g10/mainproc.c	2007-12-11 13:19:38 UTC (rev 4647)
@@ -377,10 +377,16 @@
 	}
     }
     else if( is_ELGAMAL(enc->pubkey_algo)
-	|| enc->pubkey_algo == PUBKEY_ALGO_DSA
-	|| is_RSA(enc->pubkey_algo)  ) {
-      /* FIXME:  strore this all in a list and process it later */
+             || enc->pubkey_algo == PUBKEY_ALGO_DSA
+             || is_RSA(enc->pubkey_algo)
+             || enc->pubkey_algo == PUBKEY_ALGO_ELGAMAL) {
+      /* Note that we also allow type 20 Elgamal keys for decryption.
+         There are still a couple of those keys in active use as a
+         subkey.  */
 
+      /* FIXME: Store this all in a list and process it later so that
+         we can prioritize what key to use.  This gives a better user
+         experience if wildcard keyids are used.  */
 	if ( !c->dek && ((!enc->keyid[0] && !enc->keyid[1])
                           || opt.try_all_secrets
 			  || !seckey_available( enc->keyid )) ) {




More information about the Gnupg-commits mailing list