Functions
create_tls_context
1
ssl.SSLContext
▼
Build an ``ssl.SSLContext`` from server configuration.
create_tls_context
1
ssl.SSLContext
▼
def create_tls_context(config: ServerConfig) -> ssl.SSLContext
Parameters
| Name | Type | Description |
|---|---|---|
config |
ServerConfig |
Server configuration with |
Returns
ssl.SSLContext
_build_alpn_protocols
0
list[str]
▼
Return the ALPN protocol list based on available optional deps.
If h2 is insta…
_build_alpn_protocols
0
list[str]
▼
def _build_alpn_protocols() -> list[str]
Return the ALPN protocol list based on available optional deps.
If h2 is installed, advertiseh2first (preferred), then
http/1.1 as fallback. Otherwise only http/1.1.
Returns
list[str]
is_tls_configured
1
bool
▼
Return True if TLS is configured in the server config.
is_tls_configured
1
bool
▼
def is_tls_configured(config: ServerConfig) -> bool
Parameters
| Name | Type | Description |
|---|---|---|
config |
ServerConfig |
Returns
bool