Provides data for the IrcClient.ValidateSslCertificate event.
Inheritance: System.EventArgs
Exemplo n.º 1
0
        private bool SslUserCertificateValidationCallback(object sender, X509Certificate certificate, X509Chain chain,
                                                          SslPolicyErrors sslPolicyErrors)
        {
            // Raise an event to decide whether the certificate is valid.
            var eventArgs = new IrcValidateSslCertificateEventArgs(certificate, chain, sslPolicyErrors);

            eventArgs.IsValid = true;
            OnValidateSslCertificate(eventArgs);
            return(eventArgs.IsValid);
        }
Exemplo n.º 2
0
 private bool SslUserCertificateValidationCallback(object sender, X509Certificate certificate, X509Chain chain,
     SslPolicyErrors sslPolicyErrors)
 {
     // Raise an event to decide whether the certificate is valid.
     var eventArgs = new IrcValidateSslCertificateEventArgs(certificate, chain, sslPolicyErrors);
     eventArgs.IsValid = true;
     OnValidateSslCertificate(eventArgs);
     return eventArgs.IsValid;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Raises the <see cref="ValidateSslCertificate"/> event.
 /// </summary>
 /// <param name="e">The <see cref="IrcValidateSslCertificateEventArgs"/> instance containing the event data.
 /// </param>
 protected virtual void OnValidateSslCertificate(IrcValidateSslCertificateEventArgs e)
 {
     var handler = this.ValidateSslCertificate;
     if (handler != null)
         handler(this, e);
 }