Parses the certificates and keys and builds the mbedTLS configurations. Call it once before the
first connection; the config must stay where it is and outlive every stream made from it.
Returns .CONFIG with a reason for a certificate or key that does not parse, a version range
that is empty, or a server certificate without its key. A config with no certificate is a
client; one with a certificate and key can also accept.
- config: the filled-in config. The native state is attached to it.
tls_config_init :: (config: *Tls_Config) -> Tls_Error
Parses the certificates and keys and builds the mbedTLS configurations. Call it once before the
first connection; the config must stay where it is and outlive every stream made from it.
Returns .CONFIG with a reason for a certificate or key that does not parse, a version range
that is empty, or a server certificate without its key. A config with no certificate is a
client; one with a certificate and key can also accept.
Parameters
- config: *Tls_Config
- the filled-in config. The native state is attached to it.