cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
ech.h File Reference

ech.h interface. More...

Include dependency graph for ech.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

cwist_error_t cwist_app_use_ech (cwist_app *app, const char *ech_key, const char *ech_dir)
 Enable Encrypted Client Hello (ECH) for the application.
 

Detailed Description

ech.h interface.

Definition in file ech.h.

Function Documentation

◆ cwist_app_use_ech()

cwist_error_t cwist_app_use_ech ( cwist_app *  app,
const char *  ech_key,
const char *  ech_dir 
)

Enable Encrypted Client Hello (ECH) for the application.

Enable Encrypted Client Hello (ECH) for the application.

When built against OpenSSL 3.2 or newer with ECH support (SSL_OP_ENABLE_ECH defined), this sets the ECH option on the application's SSL context. On older OpenSSL versions this is a no-op that still succeeds. The ech_key and ech_dir arguments are currently accepted but not used.

Parameters
appApplication whose SSL context is configured. Must not be NULL.
ech_keyUnused placeholder for a future ECH key configuration.
ech_dirUnused placeholder for a future ECH directory source.
Return values
CWIST_ERROR_INVALID_PARAMapp is NULL.
0Success; ECH was enabled or is unsupported on this build.

Definition at line 28 of file ech.c.

References cap, cwist_https_context::ctx, CWIST_ERR_INT16, CWIST_ERROR_INVALID_PARAM, make_error(), cwist_app::ssl_ctx, and SSL_CTX_set_options.