diff options
Diffstat (limited to 'agent')
-rw-r--r-- | agent/ChangeLog | 5 | ||||
-rw-r--r-- | agent/genkey.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog index 319cb5d35..39f02b115 100644 --- a/agent/ChangeLog +++ b/agent/ChangeLog @@ -1,9 +1,10 @@ 2007-01-25 Werner Koch <[email protected]> - * genkey.c (check_passphrase_constraints): Get ngettext call right. + * genkey.c (check_passphrase_constraints): Get ngettext call right + and use UTF-8 aware strlen. * protect-tool.c (get_passphrase): New arg OPT_CHECK. - (get_new_passphrase): Enable OTP_CHECK on the first call. + (get_new_passphrase): Enable OPT_CHECK on the first call. * command.c (cmd_get_passphrase): Implement option --check. 2007-01-24 Werner Koch <[email protected]> diff --git a/agent/genkey.c b/agent/genkey.c index 5a25d4771..9396e54d5 100644 --- a/agent/genkey.c +++ b/agent/genkey.c @@ -84,7 +84,7 @@ check_passphrase_constraints (ctrl_t ctrl, const char *pw) if (!pw) pw = ""; - if (strlen (pw) < minlen ) /* FIXME: should be an utf-8 length. */ + if (utf8_charcount (pw) < minlen ) { char *desc = xtryasprintf ( ngettext ("Warning: You have entered a passphrase that%%0A" |