Updated to use sha256 based key derivation

This commit is contained in:
jschaul 2016-12-12 20:29:35 +01:00 committed by GitHub
parent 18a71f1554
commit b2b5295e6a

View file

@ -234,10 +234,10 @@ namespace Sparkles.Git {
var git_config_required = new GitCommand (TargetFolder, "config filter.encryption.required true");
var git_config_smudge = new GitCommand (TargetFolder, "config filter.encryption.smudge " +
string.Format ("\"openssl enc -d -aes-256-cbc -base64 -S {0} -pass file:{1} -md md5\"", password_salt, password_file));
string.Format ("\"openssl enc -d -aes-256-cbc -base64 -S {0} -pass file:{1} -md sha256\"", password_salt, password_file));
var git_config_clean = new GitCommand (TargetFolder, "config filter.encryption.clean " +
string.Format ("\"openssl enc -e -aes-256-cbc -base64 -S {0} -pass file:{1} -md md5\"", password_salt, password_file));
string.Format ("\"openssl enc -e -aes-256-cbc -base64 -S {0} -pass file:{1} -md sha256\"", password_salt, password_file));
git_config_required.StartAndWaitForExit ();
git_config_smudge.StartAndWaitForExit ();
@ -263,7 +263,7 @@ namespace Sparkles.Git {
return false;
}
string args = string.Format ("enc -d -aes-256-cbc -base64 -S {0} -pass pass:{1} -in \"{2}\" -md md5",
string args = string.Format ("enc -d -aes-256-cbc -base64 -S {0} -pass pass:{1} -in \"{2}\" -md sha256",
password_salt, password.SHA256 (password_salt), password_check_file_path);
var process = new Command ("openssl", args);