public static RemoteCertValidation CreateInstance()
 {
     if (Instance == null)
     {
         Instance = new RemoteCertValidation();
     }
     return Instance;
 }
Beispiel #2
0
 private void RemoteError(X509Certificate2 cert, SslPolicyErrors errors, RemoteCertValidation validate)
 {
     if (((Control) this.mRequestSender).InvokeRequired)
     {
         RemoteErrorDelegate method = new RemoteErrorDelegate(this.RemoteError);
         ((Control) this.mRequestSender).Invoke(method, new object[] { cert, errors, validate });
     }
     else
     {
         RemoteCertWarning warning = new RemoteCertWarning(cert, errors);
         try
         {
             if (warning.ShowDialog() == DialogResult.OK)
             {
                 validate.Validated = true;
             }
         }
         finally
         {
             if (!warning.Disposing)
             {
                 warning.Dispose();
             }
         }
     }
 }