Provides data for the IrcClient.ValidateSslCertificate event.
Inheritance: System.EventArgs
示例#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);
        }
示例#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;
 }
示例#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);
 }