From 8945f1aedfd703661c300f326e70c1bf132bc656 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 8 Apr 2022 14:30:08 +0200 Subject: [PATCH] gpg: Remove restrictions for the name part of a user-id. * g10/keygen.c (ask_user_id): Allow for the name to start with a digit. Allow names shorter than 5. -- The reason for this change is that we don't enforce these constraints in the --quick-gen-key interface. I added the constraints right in the beginning of gnupg to make sure that we have a uniform style for user-ids. However, this is all problematic with non-Latin names and we prefer to use mail addresses anyway. --- g10/keygen.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/g10/keygen.c b/g10/keygen.c index 5660c8701..6106d98ba 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -3016,13 +3016,6 @@ ask_user_id (int mode, int full, KBNODE keyblock) tty_printf(_("The characters '%s' and '%s' may not " "appear in name\n"), "<", ">"); } - else if( digitp(aname) ) - tty_printf(_("Name may not start with a digit\n")); - else if (*aname && strlen (aname) < 5) - { - tty_printf(_("Name must be at least 5 characters long\n")); - /* However, we allow an empty name. */ - } else break; }