From: pkanavos Date: Mon, 2 Apr 2012 05:40:03 +0000 (+0300) Subject: Added option to disable certificate checking X-Git-Url: https://code.grnet.gr/git/pithos-ms-client/commitdiff_plain/e394ef0fa66d41c247eeebef35ccf6228024665e Added option to disable certificate checking --- 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 @@