protected virtual void OnValidateRemoteCertificate(SslValidateCertificateEventArgs e)
 {
     if (this.ValidateRemoteCertificate != null)
     {
         this.ValidateRemoteCertificate(this, e);
     }
 }
        public Boolean OnValidateRemoteCertificate(X509Certificate certificate)
        {
            SslValidateCertificateEventArgs lEventArgs = new SslValidateCertificateEventArgs(certificate);

            this.OnValidateRemoteCertificate(lEventArgs);

            return(!lEventArgs.Cancel);
        }