1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-04-17 15:44:34 +02:00

gpg: New key generation parameter "User-Id".

* g10/keygen.c (read_parameter_file): Add keyword "User-Id".
This commit is contained in:
Werner Koch 2025-04-04 16:08:35 +02:00
parent 7fc5b0328f
commit cfd597c603
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 8 additions and 5 deletions

View File

@ -4591,10 +4591,10 @@ interface is described in the subsection ``How to manage your keys''.
@subsection Unattended key generation @subsection Unattended key generation
The command @option{--generate-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. This is the most @option{--batch} for unattended key generation. This is the legacy
flexible way of generating keys, but it is also the most complex one. way of generating key. New applications should consider the use of
Consider using the quick key manipulation interface described in the the quick key manipulation interface described in the previous
previous subsection ``The quick key manipulation interface''. subsection ``The quick key manipulation interface''.
The parameters for the key are either read from stdin or given as a 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 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} @item Name-Real: @var{name}
@itemx Name-Comment: @var{comment} @itemx Name-Comment: @var{comment}
@itemx Name-Email: @var{email} @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. 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]) @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 Set the expiration date for the key (and the subkey). It may either

View File

@ -5195,6 +5195,7 @@ read_parameter_file (ctrl_t ctrl, const char *fname )
{ "Name-Real", pNAMEREAL }, { "Name-Real", pNAMEREAL },
{ "Name-Email", pNAMEEMAIL }, { "Name-Email", pNAMEEMAIL },
{ "Name-Comment", pNAMECOMMENT }, { "Name-Comment", pNAMECOMMENT },
{ "User-Id", pUSERID },
{ "Expire-Date", pEXPIREDATE }, { "Expire-Date", pEXPIREDATE },
{ "Subkey-Expire-Date", pSUBKEYEXPIREDATE }, { "Subkey-Expire-Date", pSUBKEYEXPIREDATE },
{ "Creation-Date", pCREATIONDATE }, { "Creation-Date", pCREATIONDATE },