Skip to content

jasonaowen/gpg-expiration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gpg-expiration

Check if a GPG key will expire soon.

Usage

gpg-expiration needs a key ID, or other uniquely identifying search term; gpg --list-keys SEARCH_TERM should return exactly one key.

gpg-expiration also takes an interval, specified in days. If the key (or any of its subkeys) expires within that interval, it will print the primary UID and the expiration date(s), then exit with a return code of 1. If not, it will silently exit with a return code of 0.

$ ./gpg-expiration.py --days 30 2B38BD955557647E7C26B53C19E27469767CFC68

Add it as a cron job:

$ crontab -e
# m  h dom mon dow command
  0 12  *   *  Mon ~/dev/gpg-expiration/gpg-expiration.py --days 30 2B38BD955557647E7C26B53C19E27469767CFC68

Dependencies

gpg-expiration depends on the official GPGME Python bindings.

The Python bindings are available in the Debian package python3-gpg:

$ sudo apt install python3-gpg

Releases

No releases published

Packages

No packages published

Languages