expiration date for the keys pgp (automatism)

Bernhard Reiter bernhard at intevation.de
Fri Jun 9 10:37:26 CEST 2023


Hello Marc,

Am Montag 05 Juni 2023 16:49:55 schrieb broussard marc via Gnupg-users:
> It is the firs time that I am writing to the mailing list...

welcome!

> I would to launch a script each week end, to have a warning when for
> instance, when the key is expired 4 week later. In this case, early january
> 2025 I would like this warning.
>
> I think I can manage to do it with shell script (LINUX) ...

Another option would be to use GPGME which somehow is the official API
to access GnuPG functionality and usually more stable than parsing the output
yourself in a shell.

E.g. you can use python, see https://wiki.gnupg.org/APIs .
 
> but before, I would like to if there is a fonction in pgp which allow that
> or anything similar ? => does pgp can tell when the key is becoming soon
> expired?

At least I do not remember such a function.

But I have two more hints:
 * See in the documentation for option -with-colons
   if you really do want to parse the output yourself.
 * Faking the time may help you, e.g. put it four weeks in the future.
   See for the "esoteric"  option --faked-system-time

Again, personally a python script would be my first choice.

Regards
Bernhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20230609/5c07c5ae/attachment.sig>


More information about the Gnupg-users mailing list