For testing purposes, I need a PGP key for a specific uid that has already expired.
gpg --full-generate-key only gives me the following options:
Please specify how long the key should be valid. 0 = key does not expire <n> = key expires in n days <n>w = key expires in n weeks <n>m = key expires in n months <n>y = key expires in n years
So the nearest expiration date I can set is tomorrow, which means that I'd have to wait 24 hours before I can perform my tests.
Is there a way to create an expired key other than changing the system date and time?
(I'm looking for a solution on macOS or Linux.)