aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2007-12-11 13:21:30 +0000
committerWerner Koch <[email protected]>2007-12-11 13:21:30 +0000
commit7d67e4a49790a688b714a941dc8220d2e56ab208 (patch)
treed0a31ffb060510bfeca21115c498785987f1da7f
parentFixed auto generation of the key stub. (diff)
downloadgnupg-7d67e4a49790a688b714a941dc8220d2e56ab208.tar.gz
gnupg-7d67e4a49790a688b714a941dc8220d2e56ab208.zip
Allow decryption using type 20 Elgamal keys.
-rw-r--r--g10/ChangeLog5
-rw-r--r--g10/mainproc.c13
2 files changed, 15 insertions, 3 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 1af81601b..a4a772a4f 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-11 Werner Koch <[email protected]>
+
+ * mainproc.c (proc_pubkey_enc): Allow type 20 Elgamal key for
+ decryption.
+
2007-12-10 Werner Koch <[email protected]>
* cardglue.h (gpg_error_from_syserror): New.
diff --git a/g10/mainproc.c b/g10/mainproc.c
index 03182b61b..56494cbfb 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -402,9 +402,16 @@ proc_pubkey_enc( CTX c, PACKET *pkt )
}
}
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