diff options
| author | Werner Koch <[email protected]> | 1998-10-21 17:34:36 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 1998-10-21 17:34:36 +0000 |
| commit | e309a875cb938dff76983d00552ebcc08a5e90c1 (patch) | |
| tree | a10cbf247317e67fcb623d7c10dfa4b4c58edbfd /g10/keygen.c | |
| parent | Snapshot release 0.4.2 (diff) | |
| download | gnupg-e309a875cb938dff76983d00552ebcc08a5e90c1.tar.gz gnupg-e309a875cb938dff76983d00552ebcc08a5e90c1.zip | |
Epxerimenta support for GDBM keyings.
Diffstat (limited to 'g10/keygen.c')
| -rw-r--r-- | g10/keygen.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/g10/keygen.c b/g10/keygen.c index 1aac84fa4..6b04971ca 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -541,10 +541,18 @@ ask_expiredate() static int has_invalid_email_chars( const char *s ) { + int at_seen=0; + for( ; *s; s++ ) { if( *s & 0x80 ) return 1; - if( !strchr("01234567890abcdefghijklmnopqrstuvwxyz_-.@", *s ) ) + if( *s == '@' ) + at_seen=1; + else if( !at_seen + && !strchr("01234567890abcdefghijklmnopqrstuvwxyz_-.+", *s )) + return 1; + else if( at_seen + && !strchr("01234567890abcdefghijklmnopqrstuvwxyz_-.", *s ) ) return 1; } return 0; |
