cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
ech.c
Go to the documentation of this file.
1
4#ifndef _GNU_SOURCE
5#define _GNU_SOURCE
6#endif
9#include <openssl/ssl.h>
10#include <openssl/opensslv.h>
11#include <stdio.h>
12
28cwist_error_t cwist_app_use_ech(cwist_app *app, const char *ech_key, const char *ech_dir) {
30 if (!app) {
31 err.error.err_i16 = CWIST_ERROR_INVALID_PARAM;
32 return err;
33 }
34
35#if defined(SSL_OP_ENABLE_ECH) && OPENSSL_VERSION_NUMBER >= 0x30200000L
36 if (app->ssl_ctx && app->ssl_ctx->ctx) {
38 }
41#else
42 (void)app;
45#endif
46
47 err.error.err_i16 = 0;
48 return err;
49}
cwist_error_t cwist_app_use_ech(cwist_app *app, const char *ech_key, const char *ech_dir)
Enable ECH (Encrypted Client Hello) support for an application.
Definition ech.c:28
ech.h interface.
@ CWIST_ERR_INT16
used when checking common errcodes in Unix/Linux
Definition cwist_err.h:16
cwist_error_t make_error(cwist_errtype_t type)
Creates an error object initialized with the specified type.
Definition error.c:14
mbedTLS TLS backend: version marker.
size_t cap
Definition otel.c:56
mbedTLS TLS backend: OpenSSL-shaped seam over the CWIST TLS subset.
#define SSL_CTX_set_options
Definition ssl.h:107
Main Application Context.
Definition app.h:155
cwist_https_context * ssl_ctx
SSL context when TLS is enabled.
Definition app.h:177
Integrated error structure used throughout the system.
Definition cwist_err.h:72
SSL_CTX * ctx
Definition https.h:17
Unified error code and type definitions for the CWIST system layer.
#define CWIST_ERROR_INVALID_PARAM
Definition cwist_err.h:153