![]() |
HttpServerBoxed 0.0.11 alpha
A simple http server for C# and .NET
|
The class holding the SSL configuration is SslConfiguration
, and is used only by the Configuration
class
The certificate must be in *.p12 or *.pkcs12 format
Here is an example of how to set the SSL mode
This code is very similiar to the example shown here, with the addition of the SslConfiguration parameter
The SslConfiguration contains the following parameters
Name | Return Type | Type | Description |
---|---|---|---|
IsEnabled | bool | Property | Set if the ssl mode is enabled, this value is set automatically when a valid path or certificate is set |
PortMode | void | Property | Sets if the server must listen to a secondary port for TLS requests |
upgradeUnsecureRequests | bool | Property | If set, http requests are redirected to https:// |
TLSVersions | List<TLSVersion> | Property | If set the server will use these TLS version with the client * |
SetCertificatePassword(string) | void | Function | |
SetCertificate(string) | void | Function | Sets the path of the certificate |
SetCertificate(byte[]) | void | Function | Loads the certificate from a byte array |
Note that upgradeUnsecureRequests
will also redirect normal plain request sent to the base port, not only the invalid plain request that the SslPort can receive
Name | Description |
---|---|
DeprecatedTLSVersionException | This exception is thrown when a depreceted TLS version is set |