0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

updated for version 7.4.509

Problem:    Users are not aware their encryption is weak.
Solution:   Give a warning when prompting for the key.
This commit is contained in:
Bram Moolenaar
2014-11-12 15:15:42 +01:00
parent 983c4e93dc
commit 3a0c908983
6 changed files with 27 additions and 0 deletions

View File

@@ -503,6 +503,26 @@ crypt_free_key(key)
}
}
/*
* Check the crypt method and give a warning if it's outdated.
*/
void
crypt_check_method(method)
int method;
{
if (method < CRYPT_M_BF2)
{
msg_scroll = TRUE;
MSG(_("Warning: Using a weak encryption method; see :help 'cm'"));
}
}
void
crypt_check_current_method()
{
crypt_check_method(crypt_get_method_nr(curbuf));
}
/*
* Ask the user for a crypt key.
* When "store" is TRUE, the new key is stored in the 'key' option, and the