Revert "fetcher git crypto: Send password to openssl command through stdin. Closes #1443"

This reverts commit e903b8c5a9.

Conflicts:
	SparkleLib/Git/SparkleFetcherGit.cs
This commit is contained in:
Hylke Bons 2014-07-27 16:22:28 +02:00
parent 69bf77d799
commit 39d016ec4b
2 changed files with 8 additions and 10 deletions

View file

@ -284,18 +284,16 @@ namespace SparkleLib.Git {
process.StartInfo.WorkingDirectory = TargetFolder;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardInput = true;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.FileName = "openssl";
process.StartInfo.Arguments = "enc -d -aes-256-cbc -base64 -pass stdin " +
"-in \"" + password_check_file_path + "\"";
process.StartInfo.Arguments = "enc -d -aes-256-cbc -base64 -pass pass:\"" + password + "\"" +
" -in \"" + password_check_file_path + "\"";
SparkleLogger.LogInfo ("Cmd | " + System.IO.Path.GetFileName (process.StartInfo.WorkingDirectory),
System.IO.Path.GetFileName (process.StartInfo.FileName) + " " + process.StartInfo.Arguments);
process.Start ();
process.StandardInput.WriteLine (password);
process.WaitForExit ();
if (process.ExitCode == 0) {

View file

@ -508,17 +508,17 @@ namespace SparkleShare {
public void CheckCryptoSetupPage (string password)
{
bool is_valid_password = (password.Length > 0 && !password.StartsWith (" ") && !password.EndsWith (" "));
UpdateCryptoSetupContinueButtonEvent (is_valid_password);
new Thread (() => {
bool is_valid_password = (password.Length > 0 && !password.StartsWith (" ") && !password.EndsWith (" "));
UpdateCryptoSetupContinueButtonEvent (is_valid_password);
}).Start ();
}
public void CheckCryptoPasswordPage (string password)
{
new Thread(() => {
bool is_password_correct = Program.Controller.CheckPassword (password);
UpdateCryptoPasswordContinueButtonEvent (is_password_correct);
}).Start ();
bool is_password_correct = Program.Controller.CheckPassword (password);
UpdateCryptoPasswordContinueButtonEvent (is_password_correct);
}