diff options
author | David Shaw <dshaw@jabberwocky.com> | 2004-10-10 15:13:47 +0200 |
---|---|---|
committer | David Shaw <dshaw@jabberwocky.com> | 2004-10-10 15:13:47 +0200 |
commit | 65ec9772a7befaadc2d9e0e0a931a092b76ca160 (patch) | |
tree | 907db94eeba7d8b843222edca59965c90ba37745 /g10/keygen.c | |
parent | * encr-data.c (decrypt_data): Give a warning with a weak key, but still (diff) | |
download | gnupg2-65ec9772a7befaadc2d9e0e0a931a092b76ca160.tar.xz gnupg2-65ec9772a7befaadc2d9e0e0a931a092b76ca160.zip |
* keygen.c (generate_keypair): Fix generating keys with the auth flag.
Diffstat (limited to 'g10/keygen.c')
-rw-r--r-- | g10/keygen.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/g10/keygen.c b/g10/keygen.c index d1c6e609b..62ac28f1f 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -2385,11 +2385,12 @@ generate_keypair (const char *fname, const char *card_serialno, if (use) { - r = m_alloc_clear( sizeof *r + 20 ); + r = m_alloc_clear( sizeof *r + 25 ); r->key = pKEYUSAGE; - sprintf( r->u.value, "%s%s", + sprintf( r->u.value, "%s%s%s", (use & PUBKEY_USAGE_SIG)? "sign ":"", - (use & PUBKEY_USAGE_ENC)? "encrypt ":"" ); + (use & PUBKEY_USAGE_ENC)? "encrypt ":"", + (use & PUBKEY_USAGE_AUTH)? "auth":"" ); r->next = para; para = r; } |