1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Fix for bug 851.

Fixed auto generation of the stub key for the card.
Allow to encrypt toElgamal encryption keys of type 20.
This commit is contained in:
Werner Koch 2007-12-10 15:19:34 +00:00
parent e2aefc427e
commit bc482052f8
5 changed files with 64 additions and 5 deletions

View file

@ -1,3 +1,15 @@
2007-12-10 Werner Koch <wk@g10code.com>
* 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 <wk@g10code.com>
* misc.c (openpgp_pk_algo_usage): Allow Elgamal type 20 for
encryption.
2007-12-04 Werner Koch <wk@g10code.com>
* helptext.c (get_help_from_file): New.

View file

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

View file

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