using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; namespace WebSocketSharp { public class ServerCertAuthConfiguration { /// /// Gets or sets the certificate used to authenticate the server on the secure connection. /// /// /// A that represents the certificate used to authenticate /// the server. /// public X509Certificate2 ServerCertificate { get; set; } /// /// Gets or sets the client certificate request option. /// /// /// A Boolean value that specifies whether the client must supply a certificate for authentication. /// public bool ClientCertificateRequired { get; set; } /// /// Gets or sets the Ssl protocols type enabled. /// /// /// The value that represents the protocol used for authentication. /// public SslProtocols EnabledSslProtocols { get; set; } /// /// Gets or sets the verification of certificate revocation option. /// /// /// A Boolean value that specifies whether the certificate revocation list is checked during authentication. /// public bool CheckCertificateRevocation { get; set; } /// /// Initializes a new instance of the class. /// public ServerCertAuthConfiguration(X509Certificate2 serverCertificate, bool clientCertificateRequired = false, SslProtocols enabledSslProtocols = SslProtocols.Default, bool checkCertificateRevocation = false) { this.ServerCertificate = serverCertificate; this.ClientCertificateRequired = clientCertificateRequired; this.EnabledSslProtocols = enabledSslProtocols; this.CheckCertificateRevocation = checkCertificateRevocation; } } }