mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
jnlib/
* stringhelp.c (utf8_charcount): New. agent/ * genkey.c (check_passphrase_constraints): Use UTF-8 aware strlen.
This commit is contained in:
parent
39fbda4e3c
commit
0d4b205630
6 changed files with 29 additions and 6 deletions
|
@ -1,9 +1,10 @@
|
|||
2007-01-25 Werner Koch <wk@g10code.com>
|
||||
|
||||
* 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 <wk@g10code.com>
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue