Skip to content

Instantly share code, notes, and snippets.

View jessegavin's full-sized avatar

Jesse Gavin jessegavin

View GitHub Profile
@smithrobs
smithrobs / gist:1076027
Created July 11, 2011 14:59
Full trust of all SSL certs
// callback used to validate the certificate in an SSL conversation
private static bool ValidateRemoteCertificate(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors policyErrors)
{
bool result = false;
if (cert.Subject.ToUpper().Contains("YourServerName"))
{
result = true;
}
return result;
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//