1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-05-28 21:50:02 +02:00

gpg: Adjust UID line indentation for common key algos.

* g10/keylist.c (list_keyblock_print): Change UID line indentation
* g10/mainproc.c (list_node): Ditto.
--

Due to the new keyalgo/size format the UID was not anymore printed
properly aligned to the creation date.  Although we can't do that in
any case, this change does it for common algos like "rsa2048",
"dsa2048", and "ed25519".

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2015-08-06 17:09:27 +02:00
parent e5891a82c3
commit 969542c8c2
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 6 additions and 3 deletions

View File

@ -1031,7 +1031,7 @@ list_keyblock_print (KBNODE keyblock, int secret, int fpr,
validity = uid_trust_string_fixed (pk, uid);
indent =
(keystrlen () + 9) -
(keystrlen () + (opt.legacy_list_mode? 9:11)) -
atoi (uid_trust_string_fixed (NULL, NULL));
if (indent < 0 || indent > 40)
@ -1040,7 +1040,8 @@ list_keyblock_print (KBNODE keyblock, int secret, int fpr,
es_fprintf (es_stdout, "uid%*s%s ", indent, "", validity);
}
else
es_fprintf (es_stdout, "uid%*s", (int) keystrlen () + 10, "");
es_fprintf (es_stdout, "uid%*s",
(int) keystrlen () + (opt.legacy_list_mode? 10:12), "");
print_utf8_buffer (es_stdout, uid->name, uid->len);
es_putc ('\n', es_stdout);

View File

@ -1031,7 +1031,9 @@ list_node (CTX c, kbnode_t node)
es_printf ("%s:::::::::",
node->pkt->pkt.user_id->attrib_data?"uat":"uid");
else
es_printf ("uid%*s", 28, "" );
es_printf ("uid%*s",
(int)keystrlen ()+(opt.legacy_list_mode? 9:11),
"" );
print_userid (node->pkt);
if (opt.with_colons)
es_putc (':', es_stdout);