Remove some debug rules used for crypto feature

This commit is contained in:
Hylke Bons 2012-04-26 18:48:18 +01:00
parent 8ee99fa5a0
commit b2ce29f5f2
3 changed files with 14 additions and 10 deletions

View file

@ -112,7 +112,9 @@ namespace SparkleLib {
if (RequiredFingerprint != null) {
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");
if (Failed != null)
@ -229,7 +231,14 @@ namespace SparkleLib {
string fingerprint = process.StandardOutput.ReadToEnd ().Trim ();
process.WaitForExit ();
fingerprint = fingerprint.Substring (fingerprint.IndexOf (" ") + 1, 47);
try {
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);
return fingerprint;

View file

@ -277,7 +277,7 @@ namespace SparkleShare {
public void UIHasLoaded ()
{
if (FirstRun)
ShowSetupWindow (PageType.CryptoPassword);
ShowSetupWindow (PageType.Setup);
else
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) {
if (ShowSetupWindowEvent != null)
ShowSetupWindowEvent (PageType.CryptoSetup);
if (repo_is_encrypted && repo_is_empty) {
if (ShowSetupWindowEvent != null)
ShowSetupWindowEvent (PageType.CryptoSetup);

View file

@ -176,12 +176,10 @@ namespace SparkleShare {
Program.Controller.ShowSetupWindowEvent += delegate (PageType page_type) {
if (page_type == PageType.CryptoSetup ||
page_type == PageType.CryptoPassword) {
if (page_type == PageType.CryptoSetup || page_type == PageType.CryptoPassword) {
if (ChangePageEvent != null)
ChangePageEvent (page_type, null);
return;
}