aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog5
-rw-r--r--g10/g10.c3
-rw-r--r--g10/keygen.c6
-rw-r--r--g10/options.h1
4 files changed, 14 insertions, 1 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 54f8420de..31d777ad7 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,8 @@
+Wed Aug 23 19:52:51 CEST 2000 Werner Koch <[email protected]>
+
+ * g10.c: New option --allow-freeform-uid. By Jeroen C. van Gelderen.
+ * keygen.c (ask_user_id): Implemented here.
+
Fri Aug 4 14:23:05 CEST 2000 Werner Koch <[email protected]>
* status.c (do_get_from_fd): Ooops, we used fd instead of opt.command_fd.
diff --git a/g10/g10.c b/g10/g10.c
index 49bd67ffc..7b1dfaf9c 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -182,6 +182,7 @@ enum cmd_and_opt_values { aNull = 0,
oDisableCipherAlgo,
oDisablePubkeyAlgo,
oAllowNonSelfsignedUID,
+ oAllowFreeformUID,
oNoLiteral,
oSetFilesize,
oHonorHttpProxy,
@@ -368,6 +369,7 @@ static ARGPARSE_OPTS opts[] = {
{ oDisableCipherAlgo, "disable-cipher-algo", 2, "@" },
{ oDisablePubkeyAlgo, "disable-pubkey-algo", 2, "@" },
{ oAllowNonSelfsignedUID, "allow-non-selfsigned-uid", 0, "@" },
+ { oAllowFreeformUID, "allow-freeform-uid", 0, "@" },
{ oNoLiteral, "no-literal", 0, "@" },
{ oSetFilesize, "set-filesize", 20, "@" },
{ oHonorHttpProxy,"honor-http-proxy", 0, "@" },
@@ -920,6 +922,7 @@ main( int argc, char **argv )
disable_pubkey_algo( string_to_pubkey_algo(pargs.r.ret_str) );
break;
case oAllowNonSelfsignedUID: opt.allow_non_selfsigned_uid = 1; break;
+ case oAllowFreeformUID: opt.allow_freeform_uid = 1; break;
case oNoLiteral: opt.no_literal = 1; break;
case oSetFilesize: opt.set_filesize = pargs.r.ret_ulong; break;
case oHonorHttpProxy: opt.honor_http_proxy = 1; break;
diff --git a/g10/keygen.c b/g10/keygen.c
index 58642e103..a98ec53f2 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -793,7 +793,11 @@ ask_user_id( int mode )
aname = cpr_get("keygen.name",_("Real name: "));
trim_spaces(aname);
cpr_kill_prompt();
- if( strpbrk( aname, "<([])>" ) )
+
+ if( opt.allow_freeform_uid )
+ break;
+
+ if( strpbrk( aname, "<>" ) )
tty_printf(_("Invalid character in name\n"));
else if( isdigit(*aname) )
tty_printf(_("Name may not start with a digit\n"));
diff --git a/g10/options.h b/g10/options.h
index 95881092a..18abd7ce4 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -84,6 +84,7 @@ struct {
const char *set_policy_url;
int use_embedded_filename;
int allow_non_selfsigned_uid;
+ int allow_freeform_uid;
int no_literal;
ulong set_filesize;
int honor_http_proxy;