aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2025-04-04 14:08:35 +0000
committerWerner Koch <[email protected]>2025-04-04 14:11:57 +0000
commitcfd597c60356d6d5415738b01004b3d86164fa7a (patch)
tree9626a55452610363e519eb6a57d144ff2f99400c
parentkeyboxd: Searching UpperCaseAddress. (diff)
downloadgnupg-cfd597c60356d6d5415738b01004b3d86164fa7a.tar.gz
gnupg-cfd597c60356d6d5415738b01004b3d86164fa7a.zip
gpg: New key generation parameter "User-Id".
* g10/keygen.c (read_parameter_file): Add keyword "User-Id".
-rw-r--r--doc/gpg.texi12
-rw-r--r--g10/keygen.c1
2 files changed, 8 insertions, 5 deletions
diff --git a/doc/gpg.texi b/doc/gpg.texi
index cd979b2a5..546dbf080 100644
--- a/doc/gpg.texi
+++ b/doc/gpg.texi
@@ -4591,10 +4591,10 @@ interface is described in the subsection ``How to manage your keys''.
@subsection Unattended key generation
The command @option{--generate-key} may be used along with the option
-@option{--batch} for unattended key generation. This is the most
-flexible way of generating keys, but it is also the most complex one.
-Consider using the quick key manipulation interface described in the
-previous subsection ``The quick key manipulation interface''.
+@option{--batch} for unattended key generation. This is the legacy
+way of generating key. New applications should consider the use of
+the quick key manipulation interface described in the previous
+subsection ``The quick key manipulation interface''.
The parameters for the key are either read from stdin or given as a
file on the command line. The format of the parameter file is as
@@ -4722,8 +4722,10 @@ Default is to use the Pinentry dialog to ask for a passphrase.
@item Name-Real: @var{name}
@itemx Name-Comment: @var{comment}
@itemx Name-Email: @var{email}
+@itemx User-Id: @var{full-user-id}
The three parts of a user name. Remember to use UTF-8 encoding here.
-If you don't give any of them, no user ID is created.
+As an alternative "User-Id" can be used to specify the entire user-id
+with a single UTF-8 string.
@item Expire-Date: @var{iso-date}|(@var{number}[d|w|m|y])
Set the expiration date for the key (and the subkey). It may either
diff --git a/g10/keygen.c b/g10/keygen.c
index 01ddb2e9b..8ca50a1a1 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -5195,6 +5195,7 @@ read_parameter_file (ctrl_t ctrl, const char *fname )
{ "Name-Real", pNAMEREAL },
{ "Name-Email", pNAMEEMAIL },
{ "Name-Comment", pNAMECOMMENT },
+ { "User-Id", pUSERID },
{ "Expire-Date", pEXPIREDATE },
{ "Subkey-Expire-Date", pSUBKEYEXPIREDATE },
{ "Creation-Date", pCREATIONDATE },