cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
backend_mbedtls.c File Reference

mbedTLS implementation of the CWIST TLS backend seam. More...

#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <openssl/rand.h>
#include <openssl/crypto.h>
#include <cwist/core/mem/alloc.h>
#include <mbedtls/ssl.h>
#include <mbedtls/ssl_cache.h>
#include <mbedtls/ssl_ticket.h>
#include <mbedtls/net_sockets.h>
#include <mbedtls/entropy.h>
#include <mbedtls/ctr_drbg.h>
#include <mbedtls/error.h>
#include <mbedtls/md.h>
#include <mbedtls/cipher.h>
#include <mbedtls/x509_crt.h>
#include <mbedtls/pk.h>
#include <mbedtls/platform.h>
#include <mbedtls/ssl_ciphersuites.h>
#include <stdatomic.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include <unistd.h>
Include dependency graph for backend_mbedtls.c:

Go to the source code of this file.

Macros

#define CWIST_MTLS_EX_DATA_MAX   8
 

Functions

unsigned long cwist_mtls_ERR_get_error (void)
 
void cwist_mtls_ERR_error_string_n (unsigned long e, char *buf, size_t len)
 
void cwist_mtls_ERR_clear_error (void)
 
int cwist_mtls_RAND_bytes (unsigned char *buf, int num)
 
void cwist_mtls_OPENSSL_cleanse (void *ptr, size_t len)
 
int cwist_mtls_CRYPTO_memcmp (const void *a, const void *b, size_t len)
 
const EVP_MD * cwist_mtls_EVP_sha256 (void)
 
unsigned char * cwist_mtls_HMAC (const EVP_MD *md, const void *key, int key_len, const unsigned char *msg, size_t msg_len, unsigned char *out, unsigned int *out_len)
 
HMAC_CTX * cwist_mtls_HMAC_CTX_new (void)
 
void cwist_mtls_HMAC_CTX_free (HMAC_CTX *ctx)
 
int cwist_mtls_HMAC_Init_ex (HMAC_CTX *ctx, const void *key, int key_len, const EVP_MD *md, void *engine)
 
int cwist_mtls_HMAC_Update (HMAC_CTX *ctx, const unsigned char *data, size_t len)
 
int cwist_mtls_HMAC_Final (HMAC_CTX *ctx, unsigned char *out, unsigned int *out_len)
 
const EVP_CIPHER * cwist_mtls_EVP_aes_256_cbc (void)
 
EVP_CIPHER_CTX * cwist_mtls_EVP_CIPHER_CTX_new (void)
 
void cwist_mtls_EVP_CIPHER_CTX_free (EVP_CIPHER_CTX *ctx)
 
int cwist_mtls_EVP_EncryptInit_ex (EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, void *engine, const unsigned char *key, const unsigned char *iv)
 
int cwist_mtls_EVP_DecryptInit_ex (EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, void *engine, const unsigned char *key, const unsigned char *iv)
 
int cwist_mtls_EVP_EncryptUpdate (EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl)
 
int cwist_mtls_EVP_EncryptFinal_ex (EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
 
int cwist_mtls_EVP_DecryptUpdate (EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl)
 
int cwist_mtls_EVP_DecryptFinal_ex (EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
 
int cwist_mtls_SSL_select_next_proto (unsigned char **out, unsigned char *outlen, const unsigned char *server, unsigned int server_len, const unsigned char *client, unsigned int client_len)
 
const SSL_METHOD * cwist_mtls_TLS_server_method (void)
 
const SSL_METHOD * cwist_mtls_TLS_client_method (void)
 
SSL_CTX * cwist_mtls_SSL_CTX_new (const SSL_METHOD *method)
 
void cwist_mtls_SSL_CTX_free (SSL_CTX *ctx)
 
int cwist_mtls_SSL_CTX_set_min_proto_version (SSL_CTX *ctx, uint16_t version)
 
long cwist_mtls_SSL_CTX_set_options (SSL_CTX *ctx, unsigned long options)
 
long cwist_mtls_SSL_CTX_set_mode (SSL_CTX *ctx, long mode)
 
int cwist_mtls_SSL_CTX_set_cipher_list (SSL_CTX *ctx, const char *list)
 
int cwist_mtls_SSL_CTX_set_ciphersuites (SSL_CTX *ctx, const char *list)
 
int cwist_mtls_SSL_CTX_use_certificate_chain_file (SSL_CTX *ctx, const char *path)
 
int cwist_mtls_SSL_CTX_use_PrivateKey_file (SSL_CTX *ctx, const char *path, int type)
 
int cwist_mtls_SSL_CTX_use_certificate_file (SSL_CTX *ctx, const char *path, int type)
 
int cwist_mtls_SSL_CTX_get_min_proto_version (const SSL_CTX *ctx)
 
int cwist_mtls_SSL_CTX_check_private_key (const SSL_CTX *ctx)
 
long cwist_mtls_SSL_CTX_set_session_cache_mode (SSL_CTX *ctx, long mode)
 
long cwist_mtls_SSL_CTX_sess_set_cache_size (SSL_CTX *ctx, unsigned long size)
 
int cwist_mtls_SSL_CTX_set_session_id_context (SSL_CTX *ctx, const unsigned char *sid_ctx, unsigned int sid_ctx_len)
 
long cwist_mtls_SSL_CTX_set_timeout (SSL_CTX *ctx, long seconds)
 
void cwist_mtls_SSL_CTX_set_alpn_select_cb (SSL_CTX *ctx, int(*cb)(SSL *ssl, const unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg), void *arg)
 
int cwist_mtls_SSL_CTX_set_alpn_protos (SSL_CTX *ctx, const unsigned char *protos, unsigned int protos_len)
 
void cwist_mtls_SSL_CTX_set_tlsext_ticket_key_cb (SSL_CTX *ctx, int(*cb)(SSL *ssl, unsigned char *key_name, unsigned char *iv, EVP_CIPHER_CTX *ectx, HMAC_CTX *hctx, int enc))
 
int cwist_mtls_SSL_CTX_get_ex_new_index (long argl, void *argp, void *new_func, void *dup_func, void *free_func)
 
int cwist_mtls_SSL_CTX_set_ex_data (SSL_CTX *ctx, int idx, void *data)
 
void * cwist_mtls_SSL_CTX_get_ex_data (const SSL_CTX *ctx, int idx)
 
void cwist_mtls_SSL_CTX_set_verify (SSL_CTX *ctx, int mode, void *callback)
 
int cwist_mtls_SSL_CTX_set_default_verify_paths (SSL_CTX *ctx)
 
int cwist_mtls_SSL_CTX_set1_groups_list (SSL_CTX *ctx, const char *groups)
 
SSL * cwist_mtls_SSL_new (SSL_CTX *ctx)
 
void cwist_mtls_SSL_free (SSL *ssl)
 
int cwist_mtls_SSL_set_fd (SSL *ssl, int fd)
 
int cwist_mtls_SSL_accept (SSL *ssl)
 
int cwist_mtls_SSL_connect (SSL *ssl)
 
int cwist_mtls_SSL_read (SSL *ssl, void *buf, int num)
 
int cwist_mtls_SSL_write (SSL *ssl, const void *buf, int num)
 
int cwist_mtls_SSL_pending (const SSL *ssl)
 
int cwist_mtls_SSL_shutdown (SSL *ssl)
 
int cwist_mtls_SSL_get_error (const SSL *ssl, int ret)
 
SSL_CTX * cwist_mtls_SSL_get_SSL_CTX (const SSL *ssl)
 
int cwist_mtls_SSL_session_reused (const SSL *ssl)
 
int cwist_mtls_SSL_version (const SSL *ssl)
 
const char * cwist_mtls_SSL_get_cipher_name (const SSL *ssl)
 
void cwist_mtls_SSL_get0_alpn_selected (const SSL *ssl, const unsigned char **data, unsigned int *len)
 
int cwist_mtls_SSL_set_tlsext_host_name (SSL *ssl, const char *name)
 
int cwist_mtls_SSL_set_alpn_protos (SSL *ssl, const unsigned char *protos, unsigned int protos_len)
 

Detailed Description

mbedTLS implementation of the CWIST TLS backend seam.

Implements every cwist_mtls_* function declared by the shim headers in src/security/tls/shim/openssl/ on top of mbedTLS (mbedtls_ssl_* and friends). Call sites keep their OpenSSL-shaped code; the shim macros map it here, so a CWIST_TLS=mbedtls build contains no BoringSSL objects or symbols.

Scope and honest limitations (all relative to the BoringSSL backend):

  • TLS 1.2 + 1.3, server and client, ALPN, session cache and pre-fork shared session tickets are fully supported.
  • Session-ticket keys are armed deterministically from the CWIST shared ticket key (carried in SSL_CTX ex_data by https.c), so tickets resume across forked workers and certificate hot reloads, as with BoringSSL. TLS 1.3 NewSessionTicket issuance is suppressed, though: mbedTLS writes it after the handshake wrap-up, which races clients that close right after their Finished (ECONNRESET on the trailing write fails the whole handshake). TLS 1.2 session-ID/ticket resumption via the server cache keeps working.
  • SSL_session_reused() always reports 0: mbedTLS exposes no public per-connection resumption flag, so the cwist_https_tls_handshakes_resumed_total() counter stays 0.
  • AIA chain autoload (tls_chain.c), ECH and the hybrid PQC group list are BoringSSL-only; see tls_chain.c / ech.c / pqc_layer.c.

Definition in file backend_mbedtls.c.

Macro Definition Documentation

◆ CWIST_MTLS_EX_DATA_MAX

#define CWIST_MTLS_EX_DATA_MAX   8

Definition at line 359 of file backend_mbedtls.c.

Function Documentation

◆ cwist_mtls_CRYPTO_memcmp()

int cwist_mtls_CRYPTO_memcmp ( const void *  a,
const void *  b,
size_t  len 
)

Definition at line 149 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_ERR_clear_error()

void cwist_mtls_ERR_clear_error ( void  )

Definition at line 83 of file backend_mbedtls.c.

◆ cwist_mtls_ERR_error_string_n()

void cwist_mtls_ERR_error_string_n ( unsigned long  e,
char *  buf,
size_t  len 
)

Definition at line 74 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_ERR_get_error()

unsigned long cwist_mtls_ERR_get_error ( void  )

Definition at line 68 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_EVP_aes_256_cbc()

const EVP_CIPHER * cwist_mtls_EVP_aes_256_cbc ( void  )

Definition at line 240 of file backend_mbedtls.c.

◆ cwist_mtls_EVP_CIPHER_CTX_free()

void cwist_mtls_EVP_CIPHER_CTX_free ( EVP_CIPHER_CTX *  ctx)

Definition at line 255 of file backend_mbedtls.c.

References cap, and cwist_free().

◆ cwist_mtls_EVP_CIPHER_CTX_new()

EVP_CIPHER_CTX * cwist_mtls_EVP_CIPHER_CTX_new ( void  )

Definition at line 248 of file backend_mbedtls.c.

References cap, and cwist_malloc().

◆ cwist_mtls_EVP_DecryptFinal_ex()

int cwist_mtls_EVP_DecryptFinal_ex ( EVP_CIPHER_CTX *  ctx,
unsigned char *  out,
int *  outl 
)

Definition at line 314 of file backend_mbedtls.c.

References cap, and cwist_mtls_EVP_EncryptFinal_ex().

◆ cwist_mtls_EVP_DecryptInit_ex()

int cwist_mtls_EVP_DecryptInit_ex ( EVP_CIPHER_CTX *  ctx,
const EVP_CIPHER *  type,
void *  engine,
const unsigned char *  key,
const unsigned char *  iv 
)

Definition at line 286 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_EVP_DecryptUpdate()

int cwist_mtls_EVP_DecryptUpdate ( EVP_CIPHER_CTX *  ctx,
unsigned char *  out,
int *  outl,
const unsigned char *  in,
int  inl 
)

Definition at line 309 of file backend_mbedtls.c.

References cap, and cwist_mtls_EVP_EncryptUpdate().

◆ cwist_mtls_EVP_EncryptFinal_ex()

int cwist_mtls_EVP_EncryptFinal_ex ( EVP_CIPHER_CTX *  ctx,
unsigned char *  out,
int *  outl 
)

Definition at line 301 of file backend_mbedtls.c.

References cap.

Referenced by cwist_mtls_EVP_DecryptFinal_ex().

◆ cwist_mtls_EVP_EncryptInit_ex()

int cwist_mtls_EVP_EncryptInit_ex ( EVP_CIPHER_CTX *  ctx,
const EVP_CIPHER *  type,
void *  engine,
const unsigned char *  key,
const unsigned char *  iv 
)

Definition at line 280 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_EVP_EncryptUpdate()

int cwist_mtls_EVP_EncryptUpdate ( EVP_CIPHER_CTX *  ctx,
unsigned char *  out,
int *  outl,
const unsigned char *  in,
int  inl 
)

Definition at line 292 of file backend_mbedtls.c.

References cap.

Referenced by cwist_mtls_EVP_DecryptUpdate().

◆ cwist_mtls_EVP_sha256()

const EVP_MD * cwist_mtls_EVP_sha256 ( void  )

Definition at line 165 of file backend_mbedtls.c.

◆ cwist_mtls_HMAC()

unsigned char * cwist_mtls_HMAC ( const EVP_MD *  md,
const void *  key,
int  key_len,
const unsigned char *  msg,
size_t  msg_len,
unsigned char *  out,
unsigned int *  out_len 
)

Definition at line 169 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_HMAC_CTX_free()

void cwist_mtls_HMAC_CTX_free ( HMAC_CTX *  ctx)

Definition at line 196 of file backend_mbedtls.c.

References cap, and cwist_free().

◆ cwist_mtls_HMAC_CTX_new()

HMAC_CTX * cwist_mtls_HMAC_CTX_new ( void  )

Definition at line 189 of file backend_mbedtls.c.

References cap, and cwist_malloc().

◆ cwist_mtls_HMAC_Final()

int cwist_mtls_HMAC_Final ( HMAC_CTX *  ctx,
unsigned char *  out,
unsigned int *  out_len 
)

Definition at line 224 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_HMAC_Init_ex()

int cwist_mtls_HMAC_Init_ex ( HMAC_CTX *  ctx,
const void *  key,
int  key_len,
const EVP_MD *  md,
void *  engine 
)

Definition at line 202 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_HMAC_Update()

int cwist_mtls_HMAC_Update ( HMAC_CTX *  ctx,
const unsigned char *  data,
size_t  len 
)

Definition at line 219 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_OPENSSL_cleanse()

void cwist_mtls_OPENSSL_cleanse ( void *  ptr,
size_t  len 
)

Definition at line 145 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_RAND_bytes()

int cwist_mtls_RAND_bytes ( unsigned char *  buf,
int  num 
)

Definition at line 127 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_accept()

int cwist_mtls_SSL_accept ( SSL *  ssl)

Definition at line 935 of file backend_mbedtls.c.

◆ cwist_mtls_SSL_connect()

int cwist_mtls_SSL_connect ( SSL *  ssl)

Definition at line 940 of file backend_mbedtls.c.

◆ cwist_mtls_SSL_CTX_check_private_key()

int cwist_mtls_SSL_CTX_check_private_key ( const SSL_CTX *  ctx)

Definition at line 619 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_CTX_free()

void cwist_mtls_SSL_CTX_free ( SSL_CTX *  ctx)

Definition at line 455 of file backend_mbedtls.c.

References cap.

Referenced by cwist_mtls_SSL_free().

◆ cwist_mtls_SSL_CTX_get_ex_data()

void * cwist_mtls_SSL_CTX_get_ex_data ( const SSL_CTX *  ctx,
int  idx 
)

Definition at line 820 of file backend_mbedtls.c.

References cap, and CWIST_MTLS_EX_DATA_MAX.

◆ cwist_mtls_SSL_CTX_get_ex_new_index()

int cwist_mtls_SSL_CTX_get_ex_new_index ( long  argl,
void *  argp,
void *  new_func,
void *  dup_func,
void *  free_func 
)

Definition at line 803 of file backend_mbedtls.c.

References cap, and CWIST_MTLS_EX_DATA_MAX.

◆ cwist_mtls_SSL_CTX_get_min_proto_version()

int cwist_mtls_SSL_CTX_get_min_proto_version ( const SSL_CTX *  ctx)

Definition at line 614 of file backend_mbedtls.c.

References cap, TLS1_2_VERSION, and TLS1_3_VERSION.

◆ cwist_mtls_SSL_CTX_new()

SSL_CTX * cwist_mtls_SSL_CTX_new ( const SSL_METHOD *  method)

Definition at line 394 of file backend_mbedtls.c.

References cap, cwist_free(), and cwist_malloc().

◆ cwist_mtls_SSL_CTX_sess_set_cache_size()

long cwist_mtls_SSL_CTX_sess_set_cache_size ( SSL_CTX *  ctx,
unsigned long  size 
)

Definition at line 630 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_CTX_set1_groups_list()

int cwist_mtls_SSL_CTX_set1_groups_list ( SSL_CTX *  ctx,
const char *  groups 
)

Definition at line 846 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_CTX_set_alpn_protos()

int cwist_mtls_SSL_CTX_set_alpn_protos ( SSL_CTX *  ctx,
const unsigned char *  protos,
unsigned int  protos_len 
)

Definition at line 692 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_CTX_set_alpn_select_cb()

void cwist_mtls_SSL_CTX_set_alpn_select_cb ( SSL_CTX *  ctx,
int(*)(SSL *ssl, const unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)  cb,
void *  arg 
)

Definition at line 653 of file backend_mbedtls.c.

References cap, and SSL_TLSEXT_ERR_OK.

◆ cwist_mtls_SSL_CTX_set_cipher_list()

int cwist_mtls_SSL_CTX_set_cipher_list ( SSL_CTX *  ctx,
const char *  list 
)

Definition at line 564 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_CTX_set_ciphersuites()

int cwist_mtls_SSL_CTX_set_ciphersuites ( SSL_CTX *  ctx,
const char *  list 
)

Definition at line 568 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_CTX_set_default_verify_paths()

int cwist_mtls_SSL_CTX_set_default_verify_paths ( SSL_CTX *  ctx)

Definition at line 832 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_CTX_set_ex_data()

int cwist_mtls_SSL_CTX_set_ex_data ( SSL_CTX *  ctx,
int  idx,
void *  data 
)

Definition at line 814 of file backend_mbedtls.c.

References cap, and CWIST_MTLS_EX_DATA_MAX.

◆ cwist_mtls_SSL_CTX_set_min_proto_version()

int cwist_mtls_SSL_CTX_set_min_proto_version ( SSL_CTX *  ctx,
uint16_t  version 
)

Definition at line 462 of file backend_mbedtls.c.

References cap, TLS1_2_VERSION, and TLS1_3_VERSION.

◆ cwist_mtls_SSL_CTX_set_mode()

long cwist_mtls_SSL_CTX_set_mode ( SSL_CTX *  ctx,
long  mode 
)

Definition at line 491 of file backend_mbedtls.c.

References cap, and SSL_MODE_AUTO_RETRY.

◆ cwist_mtls_SSL_CTX_set_options()

long cwist_mtls_SSL_CTX_set_options ( SSL_CTX *  ctx,
unsigned long  options 
)

Definition at line 475 of file backend_mbedtls.c.

References cap, SSL_OP_NO_TICKET, and SSL_OP_NO_TLSv1_2.

◆ cwist_mtls_SSL_CTX_set_session_cache_mode()

long cwist_mtls_SSL_CTX_set_session_cache_mode ( SSL_CTX *  ctx,
long  mode 
)

Definition at line 624 of file backend_mbedtls.c.

References cap, and SSL_SESS_CACHE_SERVER.

◆ cwist_mtls_SSL_CTX_set_session_id_context()

int cwist_mtls_SSL_CTX_set_session_id_context ( SSL_CTX *  ctx,
const unsigned char *  sid_ctx,
unsigned int  sid_ctx_len 
)

Definition at line 637 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_CTX_set_timeout()

long cwist_mtls_SSL_CTX_set_timeout ( SSL_CTX *  ctx,
long  seconds 
)

Definition at line 646 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_CTX_set_tlsext_ticket_key_cb()

void cwist_mtls_SSL_CTX_set_tlsext_ticket_key_cb ( SSL_CTX *  ctx,
int(*)(SSL *ssl, unsigned char *key_name, unsigned char *iv, EVP_CIPHER_CTX *ectx, HMAC_CTX *hctx, int enc)  cb 
)

◆ cwist_mtls_SSL_CTX_set_verify()

void cwist_mtls_SSL_CTX_set_verify ( SSL_CTX *  ctx,
int  mode,
void *  callback 
)

Definition at line 825 of file backend_mbedtls.c.

References cap, and SSL_VERIFY_PEER.

◆ cwist_mtls_SSL_CTX_use_certificate_chain_file()

int cwist_mtls_SSL_CTX_use_certificate_chain_file ( SSL_CTX *  ctx,
const char *  path 
)

Definition at line 583 of file backend_mbedtls.c.

References cap.

Referenced by cwist_mtls_SSL_CTX_use_certificate_file().

◆ cwist_mtls_SSL_CTX_use_certificate_file()

int cwist_mtls_SSL_CTX_use_certificate_file ( SSL_CTX *  ctx,
const char *  path,
int  type 
)

Definition at line 609 of file backend_mbedtls.c.

References cap, and cwist_mtls_SSL_CTX_use_certificate_chain_file().

◆ cwist_mtls_SSL_CTX_use_PrivateKey_file()

int cwist_mtls_SSL_CTX_use_PrivateKey_file ( SSL_CTX *  ctx,
const char *  path,
int  type 
)

Definition at line 596 of file backend_mbedtls.c.

References cap, and SSL_FILETYPE_PEM.

◆ cwist_mtls_SSL_free()

void cwist_mtls_SSL_free ( SSL *  ssl)

Definition at line 894 of file backend_mbedtls.c.

References cap, cwist_free(), and cwist_mtls_SSL_CTX_free().

◆ cwist_mtls_SSL_get0_alpn_selected()

void cwist_mtls_SSL_get0_alpn_selected ( const SSL *  ssl,
const unsigned char **  data,
unsigned int *  len 
)

Definition at line 1054 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_get_cipher_name()

const char * cwist_mtls_SSL_get_cipher_name ( const SSL *  ssl)

Definition at line 1031 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_get_error()

int cwist_mtls_SSL_get_error ( const SSL *  ssl,
int  ret 
)

Definition at line 1006 of file backend_mbedtls.c.

References cap, and SSL_ERROR_SSL.

◆ cwist_mtls_SSL_get_SSL_CTX()

SSL_CTX * cwist_mtls_SSL_get_SSL_CTX ( const SSL *  ssl)

Definition at line 1012 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_new()

SSL * cwist_mtls_SSL_new ( SSL_CTX *  ctx)

Definition at line 873 of file backend_mbedtls.c.

References cap, cwist_free(), cwist_malloc(), and SSL_ERROR_NONE.

◆ cwist_mtls_SSL_pending()

int cwist_mtls_SSL_pending ( const SSL *  ssl)

Definition at line 994 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_read()

int cwist_mtls_SSL_read ( SSL *  ssl,
void *  buf,
int  num 
)

◆ cwist_mtls_SSL_select_next_proto()

int cwist_mtls_SSL_select_next_proto ( unsigned char **  out,
unsigned char *  outlen,
const unsigned char *  server,
unsigned int  server_len,
const unsigned char *  client,
unsigned int  client_len 
)

Definition at line 320 of file backend_mbedtls.c.

References cap, and OPENSSL_NPN_NEGOTIATED.

◆ cwist_mtls_SSL_session_reused()

int cwist_mtls_SSL_session_reused ( const SSL *  ssl)

Definition at line 1016 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_set_alpn_protos()

int cwist_mtls_SSL_set_alpn_protos ( SSL *  ssl,
const unsigned char *  protos,
unsigned int  protos_len 
)

Definition at line 1066 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_set_fd()

int cwist_mtls_SSL_set_fd ( SSL *  ssl,
int  fd 
)

Definition at line 903 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_set_tlsext_host_name()

int cwist_mtls_SSL_set_tlsext_host_name ( SSL *  ssl,
const char *  name 
)

Definition at line 1061 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_shutdown()

int cwist_mtls_SSL_shutdown ( SSL *  ssl)

Definition at line 999 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_SSL_version()

int cwist_mtls_SSL_version ( const SSL *  ssl)

Definition at line 1023 of file backend_mbedtls.c.

References cap, TLS1_2_VERSION, and TLS1_3_VERSION.

◆ cwist_mtls_SSL_write()

int cwist_mtls_SSL_write ( SSL *  ssl,
const void *  buf,
int  num 
)

◆ cwist_mtls_TLS_client_method()

const SSL_METHOD * cwist_mtls_TLS_client_method ( void  )

Definition at line 355 of file backend_mbedtls.c.

◆ cwist_mtls_TLS_server_method()

const SSL_METHOD * cwist_mtls_TLS_server_method ( void  )

Definition at line 351 of file backend_mbedtls.c.