[prev in list] [next in list] [prev in thread] [next in thread]
List: gnupg-users
Subject: Re: expiration date for the keys pgp (automatism)
From: Werner Koch via Gnupg-users <gnupg-users () gnupg ! org>
Date: 2023-06-09 12:25:01
Message-ID: 875y7wvn4y.fsf () wheatstone ! g10code ! de
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Mon, 5 Jun 2023 14:49, broussard marc said:
> => does pgp can tell when the key is becoming soon expired?
That is easy on Unix:
$ gpg --list-keys --with-colons \
| awk -F: -v days=60 \
'BEGIN { from=systime(); to=from+(days*86400)};\
$1=="pub" && $7 > from && $7 < to { found=1 };
$1=="fpr" && found {found=0; \
print "key " $10 " expires in the next " days " days"}'
A really proper solution would use a function to decode field 7 because
it may in the future be shown as YYYYMMDDTHHMMSS (actually gpgsm does it
this way).
I will consider to allow the expiration date for the --list-filter which
could then be used on Windows (i.e. w/o awk) as well.
Shalom-Salam,
Werner
--
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein
["openpgp-digital-signature.asc" (application/pgp-signature)]
_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic