Pass expiration date param to subkey only via unattended key generation

Werner Koch wk at gnupg.org
Wed Oct 5 15:09:03 CEST 2022


On Wed,  5 Oct 2022 00:21, s7r said:

> Question is: keys can be generated unattended just fine, except I did
> not find a clear way to pass an Expire date param to the encryption
> subkey only, and not the primary key as well. The requirement is that

Use

  gpg --quick-gen-key --batch test at test.com ed25519 sign,cert

and then

  gpg --quick-add-key --batch FINGERPRINT cv25519 encr sign,cert 2y

Use --status-fd to get status lines which will return you the
fingerprint from the first command.  You might also want to use --yes to
allow creating a key with an already existing name or
--passphrase "mysecret" to avoid the pinentry.

(commands typed from memory so you may nned to consult the man page.)



Salam-Shalom,

   Werner


-- 
The pioneers of a warless world are the youth that
refuse military service.             - A. Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20221005/77d31641/attachment.sig>


More information about the Gnupg-users mailing list