From e394ef0fa66d41c247eeebef35ccf6228024665e Mon Sep 17 00:00:00 2001 From: pkanavos Date: Mon, 2 Apr 2012 08:40:03 +0300 Subject: [PATCH] Added option to disable certificate checking --- trunk/.gitignore | 4 ++++ trunk/NetSparkle/NetSparkle.cs | 5 +++-- trunk/Pithos.Client.WPF/App.xaml.cs | 4 ++++ .../Pithos.Client.WPF/Configuration/PithosSettings.cs | 10 ++++++++++ .../Preferences/PreferencesView.xaml | 1 + .../Preferences/PreferencesViewModel.cs | 17 +++++++++++++++++ .../Pithos.Client.WPF/Properties/Settings.Designer.cs | 14 +++++++++++++- trunk/Pithos.Client.WPF/Properties/Settings.settings | 3 +++ trunk/Pithos.Client.WPF/app.config | 3 +++ trunk/Pithos.Core/Agents/CloudTransferAction.cs | 3 +++ trunk/Pithos.Network/CloudFilesClient.cs | 3 ++- trunk/Pithos.Network/WebExtensions.cs | 8 +++++--- 12 files changed, 68 insertions(+), 7 deletions(-) diff --git a/trunk/.gitignore b/trunk/.gitignore index 2b67b7b..8b093f6 100644 --- a/trunk/.gitignore +++ b/trunk/.gitignore @@ -105,3 +105,7 @@ ignore[.-]* svnignore[.-]* lint.db *.vs10x + +*.vsp +*.ctl +*.psess \ No newline at end of file diff --git a/trunk/NetSparkle/NetSparkle.cs b/trunk/NetSparkle/NetSparkle.cs index e48ebdd..b28fe5f 100644 --- a/trunk/NetSparkle/NetSparkle.cs +++ b/trunk/NetSparkle/NetSparkle.cs @@ -555,9 +555,10 @@ namespace AppLimit.NetSparkle UpdateSystemProfileInformation(config); // check if update is required - NetSparkleAppCastItem latestVersion = null; + NetSparkleAppCastItem latestVersion =null; bUpdateRequired = IsUpdateRequired(config, out latestVersion); - this.LatestVersion = latestVersion.Version??""; + if (latestVersion!=null) + this.LatestVersion = latestVersion.Version??""; if (!bUpdateRequired) goto WaitSection; diff --git a/trunk/Pithos.Client.WPF/App.xaml.cs b/trunk/Pithos.Client.WPF/App.xaml.cs index 85f41c0..86e35ce 100644 --- a/trunk/Pithos.Client.WPF/App.xaml.cs +++ b/trunk/Pithos.Client.WPF/App.xaml.cs @@ -43,6 +43,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Net; using System.Reflection; using System.Text; using System.Threading; @@ -86,6 +87,9 @@ namespace Pithos.Client.WPF Settings.Default.UseDefaultProxy = true; } + if (Settings.Default.IgnoreCertificateErrors) + ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true; + InitializeComponent(); } diff --git a/trunk/Pithos.Client.WPF/Configuration/PithosSettings.cs b/trunk/Pithos.Client.WPF/Configuration/PithosSettings.cs index 01866a4..fa24bab 100644 --- a/trunk/Pithos.Client.WPF/Configuration/PithosSettings.cs +++ b/trunk/Pithos.Client.WPF/Configuration/PithosSettings.cs @@ -248,6 +248,16 @@ namespace Pithos.Client.WPF.Configuration } } + public bool IgnoreCertificateErrors + { + get { return _settings.IgnoreCertificateErrors; } + set + { + _settings.IgnoreCertificateErrors = value; + + } + } + private static void SetDebugLevel() { var loggerRepository = (Hierarchy) log4net.LogManager.GetRepository(); diff --git a/trunk/Pithos.Client.WPF/Preferences/PreferencesView.xaml b/trunk/Pithos.Client.WPF/Preferences/PreferencesView.xaml index ebe6a29..74a7d92 100644 --- a/trunk/Pithos.Client.WPF/Preferences/PreferencesView.xaml +++ b/trunk/Pithos.Client.WPF/Preferences/PreferencesView.xaml @@ -215,6 +215,7 @@