Some oAuth fixes for Imgur & Photobucket. Still having problems with Photobucket...

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2026 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-09-12 12:43:02 +00:00
parent daf24cdca0
commit f447fb8b72
11 changed files with 165 additions and 118 deletions

View file

@ -26,6 +26,8 @@ using System.Text;
using System.Collections.Specialized;
using System.Text.RegularExpressions;
using Greenshot.IniFile;
using System.Security.Cryptography.X509Certificates;
using System.Net.Security;
namespace GreenshotPlugin.Core {
/// <summary>
@ -35,6 +37,14 @@ namespace GreenshotPlugin.Core {
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(NetworkHelper));
private static CoreConfiguration config = IniConfig.GetIniSection<CoreConfiguration>();
static NetworkHelper() {
// Disable certificate checking
System.Net.ServicePointManager.ServerCertificateValidationCallback +=
delegate(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors sslError) {
bool validationResult = true;
return validationResult;
};
}
/// <summary>
/// Download a file as string
/// </summary>