Remove usage of ServicePointManager.ServerCertificateValidationCallback on Windows

This commit is contained in:
Jonathan Haines 2015-03-23 18:26:43 +11:00
parent d5972c5edb
commit 662d253303
2 changed files with 8 additions and 1 deletions

View file

@ -34,7 +34,10 @@ namespace SparkleShare
public static string GetAvatar (string email, int size, string target_path)
{
#if __MonoCS__
ServicePointManager.ServerCertificateValidationCallback = GetAvatarValidationCallBack;
#endif
email = email.ToLower ();
if (skipped_avatars.Contains (email))

View file

@ -60,7 +60,11 @@ namespace SparkleShare {
public bool Accept (string public_key)
{
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
#if __MonoCS__
ServicePointManager.ServerCertificateValidationCallback = delegate {
return true;
};
#endif
if (string.IsNullOrEmpty (AcceptUrl))
return true;