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:
20
src/crypt.c
20
src/crypt.c
@@ -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
|
||||
|
Reference in New Issue
Block a user