gopenpgp icon indicating copy to clipboard operation
gopenpgp copied to clipboard

Parameterize expiration for generation of keys

Open klische opened this issue 5 years ago • 1 comments
trafficstars

When generating keys (https://github.com/ProtonMail/gopenpgp#generate-key), there are no parameters to set the expiration date for the PGP keys.

There seems to be SigLifetimeSecs, KeyLifetimeSecs in the packet signature, but is not implemented anywhere.

Can we get this feature? Happy to help with a PR potentially.

klische avatar Jun 30 '20 22:06 klische

Hi @klische, your contribution would be more than welcome.

I'd personally add a function in crypto/key.go:

func GenerateKeyWithExpiration(name, email string, keyType string, bits int, expiration int64) (*Key, error)

wussler avatar Jul 02 '20 07:07 wussler