ytls_init()
#
ytls_init()
initializes a TLS context using the specified configuration and mode (server or client).
Prototype
hytls ytls_init(
hgobj gobj,
json_t *jn_config, // not owned
BOOL server
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The GObj context in which the TLS instance will operate. |
|
|
A JSON object containing TLS configuration parameters. This object is not owned by the function. |
|
|
A boolean flag indicating whether the TLS context should be initialized in server mode ( |
Return Value
Returns a handle to the newly created TLS context (hytls
) on success, or NULL
on failure.
Notes
The jn_config
parameter should include necessary TLS settings such as certificates, ciphers, and buffer sizes. See the structure documentation for valid configuration fields.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples