* keygen.c (generate_keypair): Fix generating keys with the auth flag.
authorDavid Shaw <dshaw@jabberwocky.com>
Sun, 10 Oct 2004 13:13:47 +0000 (13:13 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Sun, 10 Oct 2004 13:13:47 +0000 (13:13 +0000)
g10/ChangeLog
g10/keygen.c

index 0ae89ae..ab6de78 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-10  David Shaw  <dshaw@jabberwocky.com>
+
+       * keygen.c (generate_keypair): Fix generating keys with the auth
+       flag.
+
 2004-10-08  David Shaw  <dshaw@jabberwocky.com>
 
        * encr-data.c (decrypt_data): Give a warning with a weak key, but
index d1c6e60..62ac28f 100644 (file)
@@ -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;
             }