diff options
author | iabdalkader <i.abdalkader@gmail.com> | 2024-10-16 14:08:43 +0200 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-10-25 01:12:36 +1100 |
commit | 2644f577f1562a641c62d223dfb1fd80dd541ac9 (patch) | |
tree | 4b749fe728b76ebee9b93de21c90f4659744b5fc /py/mpstate.h | |
parent | 09ea901317810e9e8fbd564cdbf8d50b3569d07f (diff) |
extmod/modtls_mbedtls: Add a thread-global ptr for current SSL context.
This is necessary for mbedTLS callbacks that do not carry any user state,
so those callbacks can be customised per SSL context.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Diffstat (limited to 'py/mpstate.h')
-rw-r--r-- | py/mpstate.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/py/mpstate.h b/py/mpstate.h index af55e764f..54eca596d 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -293,6 +293,10 @@ typedef struct _mp_state_thread_t { bool prof_callback_is_executing; struct _mp_code_state_t *current_code_state; #endif + + #if MICROPY_PY_SSL_MBEDTLS_NEED_ACTIVE_CONTEXT + struct _mp_obj_ssl_context_t *tls_ssl_context; + #endif } mp_state_thread_t; // This structure combines the above 3 structures. |