C# Class Griffin.Net.Channels.ServerSideSslStreamBuilder

Used to build SSL streams for server side applications.
Inheritance: ISslStreamBuilder
Exibir arquivo Open project: jgauffin/Griffin.Framework Class Usage Examples

Public Methods

Method Description
Build ( ITcpChannel channel, Socket socket ) : SslStream

Build a new SSL steam.

ServerSideSslStreamBuilder ( X509Certificate certificate, SslProtocols allowedProtocols = SslProtocols.Tls12 ) : System

Initializes a new instance of the ServerSideSslStreamBuilder class.

Protected Methods

Method Description
OnRemoteCertifiateValidation ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslpolicyerrors ) : bool

Works just like the callback for SslStream

Method Details

Build() public method

Build a new SSL steam.
public Build ( ITcpChannel channel, Socket socket ) : SslStream
channel ITcpChannel Channel which will use the stream
socket System.Net.Sockets.Socket Socket to wrap
return System.Net.Security.SslStream

OnRemoteCertifiateValidation() protected method

Works just like the callback for SslStream
protected OnRemoteCertifiateValidation ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslpolicyerrors ) : bool
sender object
certificate System.Security.Cryptography.X509Certificates.X509Certificate
chain System.Security.Cryptography.X509Certificates.X509Chain
sslpolicyerrors SslPolicyErrors
return bool

ServerSideSslStreamBuilder() public method

Initializes a new instance of the ServerSideSslStreamBuilder class.
certificate
public ServerSideSslStreamBuilder ( X509Certificate certificate, SslProtocols allowedProtocols = SslProtocols.Tls12 ) : System
certificate System.Security.Cryptography.X509Certificates.X509Certificate The certificate.
allowedProtocols SslProtocols Which protocols to support for HTTPS. By default only Tls 1.2 is allowed (most secure)
return System