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

Attachment: openpgp-digital-signature.asc
Description: PGP signature

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to