diff options
author | Werner Koch <[email protected]> | 2016-06-02 13:54:48 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-06-02 14:01:48 +0000 |
commit | 8f2a053a0ffa0430d01a53b4d491a3f0fff683eb (patch) | |
tree | 0251344b7eb7b579016fbaf393de014cf19daa33 /doc | |
parent | gpg: Do not abort on certain invalid packets. (diff) | |
download | gnupg-8f2a053a0ffa0430d01a53b4d491a3f0fff683eb.tar.gz gnupg-8f2a053a0ffa0430d01a53b4d491a3f0fff683eb.zip |
gpg: New command --quick-addkey.
* g10/keygen.c (DEFAULT_STD_SUBKEYUSE): New.
(ask_keysize): Factor code out to ...
(get_keysize_range, fixup_keysize): new.
(parse_parameter_usage): Factor parsing out to ...
(parse_usagestr): new. Allow use of "encr" as alias for "encrypt".
(parse_subkey_algostr_usagestr): New.
(generate_subkeypair): Add new args. Implement unattended mode.
* g10/keyedit.c (keyedit_quick_sign): Factor some code out to ...
(find_by_primary_fpr): new.
(keyedit_quick_addkey): New.
* g10/gpg.c (aQuickAddKey): New.
(opts): Add --quick-addkey.
(main): Implement.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/gpg.texi | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/gpg.texi b/doc/gpg.texi index a09e610c2..9b0f1ba47 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -620,6 +620,35 @@ supplied passphrase is used for the new key and the agent does not ask for it. To create a key without any protection @code{--passphrase ''} may be used. +@item --quick-addkey @code{fpr} [@code{algo} [@code{usage} [@code{expire}]]] +@opindex quick-addkey +Directly add a subkey to the key identified by the fingerprint +@code{fpr}. Without the optional arguments an encryption subkey is +added. If any of the arguments are given a more specific subkey is +added. + +@code{algo} may be any of the supported algorithms or curve names given +in the format as used by key listings. To use the default algorithm +the string ``default'' or ``-'' can be used. Supported algorithms are +``rsa'', ``dsa'', ``elg'', ``ed25519'', ``cv25519'', and other ECC +curves. For example the string ``rsa'' adds an RSA key with the +default key length; a string ``rsa4096'' requests that the key length +is 4096 bits. + +Depending on the given @code{algo} the subkey may either be an +encryption subkey or a signing subkey. If an algorithm is capable of +signing and encryption and such a subkey is desired, a @code{usage} +string must be given. This string is either ``default'' or ``-'' to +keep the default or a comma delimited list of keywords: ``sign'' for a +signing subkey, ``auth'' for an authentication subkey, and ``encr'' +for an encryption subkey (``encrypt'' can be used as alias for +``encr''). The valid combinations depend on the algorithm. + +The @code{expire} argument can be used to specify an expiration date +for the subkey. Several formats are supported; commonly the ISO +YYYY-MM-DD format is used. The values ``never'', ``none'', or ``-'' +can be used for no expiration date. + @item --gen-key @opindex gen-key Generate a new key pair using the current default parameters. This is @@ -636,6 +665,7 @@ There is also a feature which allows you to create keys in batch mode. See the manual section ``Unattended key generation'' on how to use this. + @item --gen-revoke @code{name} @opindex gen-revoke Generate a revocation certificate for the complete key. To only revoke |