mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
* keygen.c (ask_user_id): Make --allow-freeform-uid apply to the email
field as well as the name field, and allow mixing fields when it is set.
This commit is contained in:
parent
6713fbc3a9
commit
7bf7cdb476
@ -1,3 +1,9 @@
|
||||
2003-06-18 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* keygen.c (ask_user_id): Make --allow-freeform-uid apply to the
|
||||
email field as well as the name field, and allow mixing fields
|
||||
when it is set.
|
||||
|
||||
2003-06-17 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* hkp.c (hkp_search): Return proper error code on failure.
|
||||
|
10
g10/keygen.c
10
g10/keygen.c
@ -1266,7 +1266,7 @@ ask_user_id( int mode )
|
||||
amail = cpr_get("keygen.email",_("Email address: "));
|
||||
trim_spaces(amail);
|
||||
cpr_kill_prompt();
|
||||
if( !*amail )
|
||||
if( !*amail || opt.allow_freeform_uid )
|
||||
break; /* no email address is okay */
|
||||
else if( has_invalid_email_chars(amail)
|
||||
|| string_count_chr(amail,'@') != 1
|
||||
@ -1319,11 +1319,13 @@ ask_user_id( int mode )
|
||||
|
||||
tty_printf(_("You selected this USER-ID:\n \"%s\"\n\n"), uid);
|
||||
/* fixme: add a warning if this user-id already exists */
|
||||
if( !*amail && (strchr( aname, '@' ) || strchr( acomment, '@'))) {
|
||||
if( !*amail && !opt.allow_freeform_uid
|
||||
&& (strchr( aname, '@' ) || strchr( acomment, '@')))
|
||||
{
|
||||
fail = 1;
|
||||
tty_printf(_("Please don't put the email address "
|
||||
"into the real name or the comment\n") );
|
||||
}
|
||||
"into the real name or the comment\n") );
|
||||
}
|
||||
|
||||
for(;;) {
|
||||
const char *ansstr = _("NnCcEeOoQq");
|
||||
|
Loading…
x
Reference in New Issue
Block a user