Method UseSsl
UseSsl(HttpServerHostContextBuilder, short, X509Certificate, SslProtocols, bool)
Configures the HttpServerHostContext to use SslProxy with the specified parameters.
public static HttpServerHostContextBuilder UseSsl(this HttpServerHostContextBuilder builder, short sslListeningPort, X509Certificate certificate, SslProtocols allowedProtocols = SslProtocols.Tls12 | SslProtocols.Tls13, bool clientCertificateRequired = false)
Parameters
builder
HttpServerHostContextBuilderThe HttpServerHostContextBuilder instance to configure.
sslListeningPort
shortThe port number on which the server will listen for SSL/HTTPS connections.
certificate
X509CertificateThe SSL/HTTPS certificate to use for encrypting communications.
allowedProtocols
SslProtocolsThe SSL/HTTPS protocols allowed for the connection. Defaults to Tls12 and Tls13.
clientCertificateRequired
boolSpecifies whether a client certificate is required for authentication. Defaults to
false
.
Returns
- HttpServerHostContextBuilder
The configured HttpServerHostContextBuilder instance.