From 813ae5fa2d712aa9679b791c67c9c1c43d36ffe4 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 28 Mar 2017 11:40:44 +0200 Subject: core: Prepare for new key listing data send by gpg. * src/gpgme.h.in (gpgme_user_id_t): New fields 'origin' and 'last_update'. (gpgme_key_t): New fields 'origin' and 'last_update'. * src/conversion.c (_gpgme_parse_timestamp_ul): New. * src/keylist.c (keylist_colon_handler): Parse fields 19 and 20. * tests/run-keylist.c (main): Print new fields. Signed-off-by: Werner Koch --- src/gpgme.h.in | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/gpgme.h.in') diff --git a/src/gpgme.h.in b/src/gpgme.h.in index b6c14064..24b21e7d 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -662,7 +662,10 @@ struct _gpgme_user_id unsigned int invalid : 1; /* Internal to GPGME, do not use. */ - unsigned int _unused : 30; + unsigned int _unused : 25; + + /* Origin of this user ID. */ + unsigned int origin : 5; /* The validity of the user ID. */ gpgme_validity_t validity; @@ -693,6 +696,9 @@ struct _gpgme_user_id /* The malloced TOFU information or NULL. */ gpgme_tofu_info_t tofu; + + /* Time of the last refresh of thsi user id. 0 if unknown. */ + unsigned long last_update; }; typedef struct _gpgme_user_id *gpgme_user_id_t; @@ -736,7 +742,10 @@ struct _gpgme_key unsigned int is_qualified : 1; /* Internal to GPGME, do not use. */ - unsigned int _unused : 22; + unsigned int _unused : 17; + + /* Origin of this key. */ + unsigned int origin : 5; /* This is the protocol supported by this key. */ gpgme_protocol_t protocol; @@ -776,6 +785,9 @@ struct _gpgme_key * this is a copy of the FPR of the first subkey. We need it here * to allow for an incomplete key object. */ char *fpr; + + /* Time of the last refresh of the entire key. 0 if unknown. */ + unsigned long last_update; }; typedef struct _gpgme_key *gpgme_key_t; -- cgit v1.2.3