From 4af389c9721fa534ed06a64b80705b631575c775 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 28 Mar 2017 09:37:18 +0200 Subject: [PATCH] gpg: Prepare for listing last_update and key origin data. * g10/keylist.c (list_keyblock_colon): Add empty fields 19 and 20. -- We add them now to early catch error in parsers which arbitrary limit the number of fields in --with-colon listings. Signed-off-by: Werner Koch --- doc/DETAILS | 17 +++++++++++++++++ g10/keylist.c | 8 ++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/doc/DETAILS b/doc/DETAILS index cfe70e1df..83d9fea75 100644 --- a/doc/DETAILS +++ b/doc/DETAILS @@ -149,6 +149,7 @@ described here. the regular expression value, quoted as in field 10. *** Field 10 - User-ID + The value is quoted like a C string to avoid control characters (the colon is quoted =\x3a=). For a "pub" record this field is not used on --fixed-list-mode. A UAT record puts the attribute @@ -156,6 +157,7 @@ described here. subpacket size. In gpgsm the issuer name comes here. A FPR record stores the fingerprint here. The fingerprint of a revocation key is stored here. + *** Field 11 - Signature class Signature class as per RFC-4880. This is a 2 digit hexnumber @@ -227,6 +229,21 @@ described here. - 8 :: The key is compliant with RFC4880bis - 23 :: The key is compliant with compliance mode "de-vs". +*** Field 19 - Last update + + The timestamp of the last update of a key or user ID. The update + time of a key is defined a lookup of the key via its unique + identifier (fingerprint); the field is empty if not known. The + update time of a user ID is defined by a lookup of the key using a + trusted mapping from mail address to key. + +*** Field 20 - Origin + + The origin of the key or the user ID. This is an integer + optionally followed by a space and an URL. This goes along with + the previous field. The values are not yet defined. + + ** Special fields *** PKD - Public key data diff --git a/g10/keylist.c b/g10/keylist.c index b8f32be56..e99e34ba1 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -1308,7 +1308,9 @@ list_keyblock_colon (ctrl_t ctrl, kbnode_t keyblock, } es_putc (':', es_stdout); /* End of field 17. */ print_compliance_flags (pk, keylength, curvename); - es_putc (':', es_stdout); /* End of field 18. */ + es_putc (':', es_stdout); /* End of field 18 (compliance). */ + es_putc (':', es_stdout); /* End of field 19 (last_update). */ + es_putc (':', es_stdout); /* End of field 20 (origin). */ es_putc ('\n', es_stdout); print_revokers (es_stdout, pk); @@ -1358,7 +1360,9 @@ list_keyblock_colon (ctrl_t ctrl, kbnode_t keyblock, es_fprintf (es_stdout, "%u %lu", uid->numattribs, uid->attrib_len); else es_write_sanitized (es_stdout, uid->name, uid->len, ":", NULL); - es_putc (':', es_stdout); + es_fputs (":::::::::", es_stdout); + es_putc (':', es_stdout); /* End of field 19 (last_update). */ + es_putc (':', es_stdout); /* End of field 20 (origin). */ es_putc ('\n', es_stdout); #ifdef USE_TOFU if (!uid->attrib_data && opt.with_tofu_info