1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

gpg: Add --list-filter properties sig_expires/sig_expires_d

Modelled after key_expires/key_expires_d.

This should be useful to detect upcoming certification expiry, so the
certifications can be renewed in advance of the expiry.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
This commit is contained in:
Robin H. Johnson via Gnupg-devel 2023-09-02 09:59:43 -07:00 committed by Werner Koch
parent 4fc745bc43
commit bf662d0f93
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
2 changed files with 20 additions and 0 deletions

View file

@ -1509,6 +1509,20 @@ impex_filter_getval (void *cookie, const char *propname)
{
result = dateonlystr_from_sig (sig);
}
else if (!strcmp (propname, "sig_expires"))
{
snprintf (numbuf, sizeof numbuf, "%lu", (ulong)sig->expiredate);
result = numbuf;
}
else if (!strcmp (propname, "sig_expires_d"))
{
static char exdatestr[MK_DATESTR_SIZE];
if (sig->expiredate)
result = mk_datestr (exdatestr, sizeof exdatestr, sig->expiredate);
else
result = "";
}
else if (!strcmp (propname, "sig_algo"))
{
snprintf (numbuf, sizeof numbuf, "%d", sig->pubkey_algo);