1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

g10,sm: Spell out --gen-key.

* g10/gpg.c (opts): Spell out option.
* sm/gpgsm.c (opts): Likewise.
* doc/gpg.texi: Update accordingly.

GnuPG-bug-id: 2700
Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-11-14 16:59:23 +01:00
parent 9147737f1c
commit 892c827e72
8 changed files with 23 additions and 20 deletions

View File

@ -235,7 +235,8 @@ gpg: fatal: WriteConsole failed: Access denied
@noindent @noindent
The solution is to use the command @command{wineconsole}. The solution is to use the command @command{wineconsole}.
Some operations like gen-key really want to talk to the console directly Some operations like @option{--generate-key} really want to talk to
the console directly
for increased security (for example to prevent the passphrase from for increased security (for example to prevent the passphrase from
appearing on the screen). So, you should use @command{wineconsole} appearing on the screen). So, you should use @command{wineconsole}
instead of @command{wine}, which will launch a windows console that instead of @command{wine}, which will launch a windows console that

View File

@ -1243,7 +1243,7 @@ update this FAQ in the next month. See the section "Changes" for recent updates
To generate a secret/public keypair, run: To generate a secret/public keypair, run:
: $ gpg --gen-key : $ gpg --generate-key
and choose the default values. and choose the default values.

View File

@ -611,7 +611,7 @@ This section explains the main commands for key management.
@item --quick-gen-key @code{user-id} [@code{algo} [@code{usage} [@code{expire}]]] @item --quick-gen-key @code{user-id} [@code{algo} [@code{usage} [@code{expire}]]]
@opindex quick-gen-key @opindex quick-gen-key
This is a simple command to generate a standard key with one user id. This is a simple command to generate a standard key with one user id.
In contrast to @option{--gen-key} the key is generated directly In contrast to @option{--generate-key} the key is generated directly
without the need to answer a bunch of prompts. Unless the option without the need to answer a bunch of prompts. Unless the option
@option{--yes} is given, the key creation will be canceled if the @option{--yes} is given, the key creation will be canceled if the
given user id already exists in the keyring. given user id already exists in the keyring.
@ -681,8 +681,8 @@ for the subkey. Several formats are supported; commonly the ISO
YYYY-MM-DD format is used. The values ``never'', ``none'', or ``-'' YYYY-MM-DD format is used. The values ``never'', ``none'', or ``-''
can be used for no expiration date. can be used for no expiration date.
@item --gen-key @item --generate-key
@opindex gen-key @opindex generate-key
Generate a new key pair using the current default parameters. This is Generate a new key pair using the current default parameters. This is
the standard command to create a new key. In addition to the key a the standard command to create a new key. In addition to the key a
revocation certificate is created and stored in the revocation certificate is created and stored in the
@ -691,7 +691,7 @@ revocation certificate is created and stored in the
@item --full-gen-key @item --full-gen-key
@opindex gen-key @opindex gen-key
Generate a new key pair with dialogs for all options. This is an Generate a new key pair with dialogs for all options. This is an
extended version of @option{--gen-key}. extended version of @option{--generate-key}.
There is also a feature which allows you to create keys in batch There is also a feature which allows you to create keys in batch
mode. See the manual section ``Unattended key generation'' on how mode. See the manual section ``Unattended key generation'' on how
@ -1342,7 +1342,7 @@ the opposite meaning. The options are:
@itemx --disable-large-rsa @itemx --disable-large-rsa
@opindex enable-large-rsa @opindex enable-large-rsa
@opindex disable-large-rsa @opindex disable-large-rsa
With --gen-key and --batch, enable the creation of RSA secret keys as With --generate-key and --batch, enable the creation of RSA secret keys as
large as 8192 bit. Note: 8192 bit is more than is generally large as 8192 bit. Note: 8192 bit is more than is generally
recommended. These large keys don't significantly improve security, recommended. These large keys don't significantly improve security,
but they are more expensive to use, and their signatures and but they are more expensive to use, and their signatures and
@ -3729,7 +3729,7 @@ are almost always required for this.
@node Unattended GPG key generation @node Unattended GPG key generation
@subsection Unattended key generation @subsection Unattended key generation
The command @option{--gen-key} may be used along with the option The command @option{--generate-key} may be used along with the option
@option{--batch} for unattended key generation. The parameters are @option{--batch} for unattended key generation. The parameters are
either read from stdin or given as a file on the command line. either read from stdin or given as a file on the command line.
The format of the parameter file is as follows: The format of the parameter file is as follows:
@ -3921,7 +3921,7 @@ $ cat >foo <<EOF
%commit %commit
%echo done %echo done
EOF EOF
$ @gpgname --batch --gen-key foo $ @gpgname --batch --generate-key foo
[...] [...]
$ @gpgname --no-default-keyring --secret-keyring ./foo.sec \ $ @gpgname --no-default-keyring --secret-keyring ./foo.sec \
--keyring ./foo.pub --list-secret-keys --keyring ./foo.pub --list-secret-keys

View File

@ -165,8 +165,8 @@ use @samp{--help} to get a list of supported operations.
@subsection How to manage the certificates and keys @subsection How to manage the certificates and keys
@table @gnupgtabopt @table @gnupgtabopt
@item --gen-key @item --generate-key
@opindex gen-key @opindex generate-key
This command allows the creation of a certificate signing request or a This command allows the creation of a certificate signing request or a
self-signed certificate. It is commonly used along with the self-signed certificate. It is commonly used along with the
@option{--output} option to save the created CSR or certificate into a @option{--output} option to save the created CSR or certificate into a
@ -1005,7 +1005,7 @@ this is a missing certificate.
@node CSR and certificate creation @node CSR and certificate creation
@subsection CSR and certificate creation @subsection CSR and certificate creation
The command @option{--gen-key} may be used along with the option The command @option{--generate-key} may be used along with the option
@option{--batch} to either create a certificate signing request (CSR) @option{--batch} to either create a certificate signing request (CSR)
or an X.509 certificate. This is controlled by a parameter file; the or an X.509 certificate. This is controlled by a parameter file; the
format of this file is as follows: format of this file is as follows:

View File

@ -12,7 +12,7 @@ is no need for a configuration file, you may simply enter:
@cartouche @cartouche
@example @example
$ gpgsm --gen-key >example.com.cert-req.pem $ gpgsm --generate-key >example.com.cert-req.pem
Please select what kind of key you want: Please select what kind of key you want:
(1) RSA (1) RSA
(2) Existing key (2) Existing key

View File

@ -444,8 +444,9 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_c (aCheckKeys, "check-sigs", "@"), ARGPARSE_c (aCheckKeys, "check-sigs", "@"),
ARGPARSE_c (oFingerprint, "fingerprint", N_("list keys and fingerprints")), ARGPARSE_c (oFingerprint, "fingerprint", N_("list keys and fingerprints")),
ARGPARSE_c (aListSecretKeys, "list-secret-keys", N_("list secret keys")), ARGPARSE_c (aListSecretKeys, "list-secret-keys", N_("list secret keys")),
ARGPARSE_c (aKeygen, "gen-key", ARGPARSE_c (aKeygen, "generate-key",
N_("generate a new key pair")), N_("generate a new key pair")),
ARGPARSE_c (aKeygen, "gen-key", "@"),
ARGPARSE_c (aQuickKeygen, "quick-gen-key" , ARGPARSE_c (aQuickKeygen, "quick-gen-key" ,
N_("quickly generate a new key pair")), N_("quickly generate a new key pair")),
ARGPARSE_c (aQuickAddUid, "quick-adduid", ARGPARSE_c (aQuickAddUid, "quick-adduid",
@ -4318,20 +4319,20 @@ main (int argc, char **argv)
case aKeygen: /* generate a key */ case aKeygen: /* generate a key */
if( opt.batch ) { if( opt.batch ) {
if( argc > 1 ) if( argc > 1 )
wrong_args("--gen-key [parameterfile]"); wrong_args("--generate-key [parameterfile]");
generate_keypair (ctrl, 0, argc? *argv : NULL, NULL, 0); generate_keypair (ctrl, 0, argc? *argv : NULL, NULL, 0);
} }
else { else {
if (opt.command_fd != -1 && argc) if (opt.command_fd != -1 && argc)
{ {
if( argc > 1 ) if( argc > 1 )
wrong_args("--gen-key [parameterfile]"); wrong_args("--generate-key [parameterfile]");
opt.batch = 1; opt.batch = 1;
generate_keypair (ctrl, 0, argc? *argv : NULL, NULL, 0); generate_keypair (ctrl, 0, argc? *argv : NULL, NULL, 0);
} }
else if (argc) else if (argc)
wrong_args ("--gen-key"); wrong_args ("--generate-key");
else else
generate_keypair (ctrl, 0, NULL, NULL, 0); generate_keypair (ctrl, 0, NULL, NULL, 0);
} }

View File

@ -210,7 +210,8 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_c (aListSecretKeys, "list-secret-keys", N_("list secret keys")), ARGPARSE_c (aListSecretKeys, "list-secret-keys", N_("list secret keys")),
ARGPARSE_c (aListChain, "list-chain", N_("list certificate chain")), ARGPARSE_c (aListChain, "list-chain", N_("list certificate chain")),
ARGPARSE_c (aFingerprint, "fingerprint", N_("list keys and fingerprints")), ARGPARSE_c (aFingerprint, "fingerprint", N_("list keys and fingerprints")),
ARGPARSE_c (aKeygen, "gen-key", N_("generate a new key pair")), ARGPARSE_c (aKeygen, "generate-key", N_("generate a new key pair")),
ARGPARSE_c (aKeygen, "gen-key", "@"),
ARGPARSE_c (aDeleteKey, "delete-keys", ARGPARSE_c (aDeleteKey, "delete-keys",
N_("remove keys from the public keyring")), N_("remove keys from the public keyring")),
/*ARGPARSE_c (aSendKeys, "send-keys", N_("export keys to a keyserver")),*/ /*ARGPARSE_c (aSendKeys, "send-keys", N_("export keys to a keyserver")),*/
@ -1904,7 +1905,7 @@ main ( int argc, char **argv)
else if (argc == 1) /* From file. */ else if (argc == 1) /* From file. */
fpin = open_es_fread (*argv, "r"); fpin = open_es_fread (*argv, "r");
else else
wrong_args ("--gen-key --batch [parmfile]"); wrong_args ("--generate-key --batch [parmfile]");
} }
fpout = open_es_fwrite (opt.outfile?opt.outfile:"-"); fpout = open_es_fwrite (opt.outfile?opt.outfile:"-");

View File

@ -23,7 +23,7 @@
(define (genkey config) (define (genkey config)
(pipe:do (pipe:do
(pipe:echo config) (pipe:echo config)
(pipe:spawn `(,(tool 'gpg) --quiet --batch --gen-key)))) (pipe:spawn `(,(tool 'gpg) --quiet --batch --generate-key))))
(info "Checking batch key generation") (info "Checking batch key generation")
(genkey "Key-Type: DSA (genkey "Key-Type: DSA