Remove some debug rules used for crypto feature
This commit is contained in:
parent
8ee99fa5a0
commit
b2ce29f5f2
|
@ -112,7 +112,9 @@ namespace SparkleLib {
|
||||||
if (RequiredFingerprint != null) {
|
if (RequiredFingerprint != null) {
|
||||||
string host_fingerprint = GetFingerprint (host_key);
|
string host_fingerprint = GetFingerprint (host_key);
|
||||||
|
|
||||||
if (!RequiredFingerprint.Equals (host_fingerprint)) {
|
if (host_fingerprint == null ||
|
||||||
|
!RequiredFingerprint.Equals (host_fingerprint)) {
|
||||||
|
|
||||||
SparkleHelpers.DebugInfo ("Auth", "Fingerprint doesn't match");
|
SparkleHelpers.DebugInfo ("Auth", "Fingerprint doesn't match");
|
||||||
|
|
||||||
if (Failed != null)
|
if (Failed != null)
|
||||||
|
@ -229,7 +231,14 @@ namespace SparkleLib {
|
||||||
string fingerprint = process.StandardOutput.ReadToEnd ().Trim ();
|
string fingerprint = process.StandardOutput.ReadToEnd ().Trim ();
|
||||||
process.WaitForExit ();
|
process.WaitForExit ();
|
||||||
|
|
||||||
|
try {
|
||||||
fingerprint = fingerprint.Substring (fingerprint.IndexOf (" ") + 1, 47);
|
fingerprint = fingerprint.Substring (fingerprint.IndexOf (" ") + 1, 47);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
SparkleHelpers.DebugInfo ("Fetcher", "Not a valid fingerprint: " + e.Message);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
File.Delete (tmp_file_path);
|
File.Delete (tmp_file_path);
|
||||||
|
|
||||||
return fingerprint;
|
return fingerprint;
|
||||||
|
|
|
@ -277,7 +277,7 @@ namespace SparkleShare {
|
||||||
public void UIHasLoaded ()
|
public void UIHasLoaded ()
|
||||||
{
|
{
|
||||||
if (FirstRun)
|
if (FirstRun)
|
||||||
ShowSetupWindow (PageType.CryptoPassword);
|
ShowSetupWindow (PageType.Setup);
|
||||||
else
|
else
|
||||||
new Thread (new ThreadStart (PopulateRepositories)).Start ();
|
new Thread (new ThreadStart (PopulateRepositories)).Start ();
|
||||||
}
|
}
|
||||||
|
@ -961,9 +961,6 @@ namespace SparkleShare {
|
||||||
|
|
||||||
|
|
||||||
this.fetcher.Finished += delegate (bool repo_is_encrypted, bool repo_is_empty, string [] warnings) {
|
this.fetcher.Finished += delegate (bool repo_is_encrypted, bool repo_is_empty, string [] warnings) {
|
||||||
if (ShowSetupWindowEvent != null)
|
|
||||||
ShowSetupWindowEvent (PageType.CryptoSetup);
|
|
||||||
|
|
||||||
if (repo_is_encrypted && repo_is_empty) {
|
if (repo_is_encrypted && repo_is_empty) {
|
||||||
if (ShowSetupWindowEvent != null)
|
if (ShowSetupWindowEvent != null)
|
||||||
ShowSetupWindowEvent (PageType.CryptoSetup);
|
ShowSetupWindowEvent (PageType.CryptoSetup);
|
||||||
|
|
|
@ -176,9 +176,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
|
|
||||||
Program.Controller.ShowSetupWindowEvent += delegate (PageType page_type) {
|
Program.Controller.ShowSetupWindowEvent += delegate (PageType page_type) {
|
||||||
if (page_type == PageType.CryptoSetup ||
|
if (page_type == PageType.CryptoSetup || page_type == PageType.CryptoPassword) {
|
||||||
page_type == PageType.CryptoPassword) {
|
|
||||||
|
|
||||||
if (ChangePageEvent != null)
|
if (ChangePageEvent != null)
|
||||||
ChangePageEvent (page_type, null);
|
ChangePageEvent (page_type, null);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue