summaryrefslogtreecommitdiffstats
path: root/g10/keygen.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1999-02-28 19:14:18 +0100
committerWerner Koch <wk@gnupg.org>1999-02-28 19:14:18 +0100
commit0f5bb383b58a46499ceb5da275a99be6e3b355e1 (patch)
tree9727d30a543f8b56f6c7b1b6ae706940034fd765 /g10/keygen.c
parentSee ChangeLog: Fri Feb 26 17:55:41 CET 1999 Werner Koch (diff)
downloadgnupg2-0f5bb383b58a46499ceb5da275a99be6e3b355e1.tar.xz
gnupg2-0f5bb383b58a46499ceb5da275a99be6e3b355e1.zip
See ChangeLog: Sun Feb 28 19:11:00 CET 1999 Werner Koch
Diffstat (limited to 'g10/keygen.c')
-rw-r--r--g10/keygen.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index dd812e729..1e40186c9 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -555,17 +555,18 @@ static int
has_invalid_email_chars( const char *s )
{
int at_seen=0;
+ static char valid_chars[] = "01234567890_-."
+ "abcdefghijklmnopqrstuvwxyz"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
for( ; *s; s++ ) {
if( *s & 0x80 )
return 1;
if( *s == '@' )
at_seen=1;
- else if( !at_seen
- && !strchr("01234567890abcdefghijklmnopqrstuvwxyz_-.+", *s ))
+ else if( !at_seen && !( !!strchr( valid_chars, *s ) || *s == '+' ) )
return 1;
- else if( at_seen
- && !strchr("01234567890abcdefghijklmnopqrstuvwxyz_-.", *s ) )
+ else if( at_seen && !strchr( valid_chars, *s ) )
return 1;
}
return 0;
@@ -608,7 +609,6 @@ ask_user_id( int mode )
m_free(amail);
amail = cpr_get("keygen.email",_("Email address: "));
trim_spaces(amail);
- strlwr(amail);
cpr_kill_prompt();
if( !*amail )
break; /* no email address is okay */