aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2007-12-10 15:19:34 +0000
committerWerner Koch <[email protected]>2007-12-10 15:19:34 +0000
commitbc482052f84e8340e0eebb540c39d143fac120af (patch)
tree7699f69d755c5196c98c2f3fa3f6e647c74bdd85 /g10
parentAdd support for help stuff to audit.c (diff)
downloadgnupg-bc482052f84e8340e0eebb540c39d143fac120af.tar.gz
gnupg-bc482052f84e8340e0eebb540c39d143fac120af.zip
Fix for bug 851.
Fixed auto generation of the stub key for the card. Allow to encrypt toElgamal encryption keys of type 20.
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog12
-rw-r--r--g10/import.c4
-rw-r--r--g10/misc.c1
3 files changed, 15 insertions, 2 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 15840393e..a44f26d23 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,15 @@
+2007-12-10 Werner Koch <[email protected]>
+
+ * import.c (auto_create_card_key_stub): Do not clear the entire
+ fingerprint. This finally makes the stub creation work. My past
+ tests seemed to work because there was a key with a all zero
+ fingerprint available (Elgamal signing keys).
+
+2007-12-08 Werner Koch <[email protected]>
+
+ * misc.c (openpgp_pk_algo_usage): Allow Elgamal type 20 for
+ encryption.
+
2007-12-04 Werner Koch <[email protected]>
* helptext.c (get_help_from_file): New.
diff --git a/g10/import.c b/g10/import.c
index a58637c9d..66aa875c4 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -2355,7 +2355,8 @@ auto_create_card_key_stub ( const char *serialnostr,
size_t an;
fingerprint_from_pk (pk, afp, &an);
- memset (afp, 0, MAX_FINGERPRINT_LEN);
+ if (an < MAX_FINGERPRINT_LEN)
+ memset (afp+an, 0, MAX_FINGERPRINT_LEN-an);
rc = keydb_search_fpr (hd, afp);
}
@@ -2410,4 +2411,3 @@ auto_create_card_key_stub ( const char *serialnostr,
keydb_release (hd);
return rc;
}
-
diff --git a/g10/misc.c b/g10/misc.c
index f02601fc4..5f9af54c3 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -379,6 +379,7 @@ openpgp_pk_algo_usage ( int algo )
case PUBKEY_ALGO_RSA_S:
use = PUBKEY_USAGE_CERT | PUBKEY_USAGE_SIG;
break;
+ case PUBKEY_ALGO_ELGAMAL:
case PUBKEY_ALGO_ELGAMAL_E:
use = PUBKEY_USAGE_ENC;
break;