mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-22 14:57:02 +01: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:
parent
e5891a82c3
commit
969542c8c2
@ -1031,7 +1031,7 @@ list_keyblock_print (KBNODE keyblock, int secret, int fpr,
|
|||||||
|
|
||||||
validity = uid_trust_string_fixed (pk, uid);
|
validity = uid_trust_string_fixed (pk, uid);
|
||||||
indent =
|
indent =
|
||||||
(keystrlen () + 9) -
|
(keystrlen () + (opt.legacy_list_mode? 9:11)) -
|
||||||
atoi (uid_trust_string_fixed (NULL, NULL));
|
atoi (uid_trust_string_fixed (NULL, NULL));
|
||||||
|
|
||||||
if (indent < 0 || indent > 40)
|
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);
|
es_fprintf (es_stdout, "uid%*s%s ", indent, "", validity);
|
||||||
}
|
}
|
||||||
else
|
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);
|
print_utf8_buffer (es_stdout, uid->name, uid->len);
|
||||||
es_putc ('\n', es_stdout);
|
es_putc ('\n', es_stdout);
|
||||||
|
@ -1031,7 +1031,9 @@ list_node (CTX c, kbnode_t node)
|
|||||||
es_printf ("%s:::::::::",
|
es_printf ("%s:::::::::",
|
||||||
node->pkt->pkt.user_id->attrib_data?"uat":"uid");
|
node->pkt->pkt.user_id->attrib_data?"uat":"uid");
|
||||||
else
|
else
|
||||||
es_printf ("uid%*s", 28, "" );
|
es_printf ("uid%*s",
|
||||||
|
(int)keystrlen ()+(opt.legacy_list_mode? 9:11),
|
||||||
|
"" );
|
||||||
print_userid (node->pkt);
|
print_userid (node->pkt);
|
||||||
if (opt.with_colons)
|
if (opt.with_colons)
|
||||||
es_putc (':', es_stdout);
|
es_putc (':', es_stdout);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user