summaryrefslogtreecommitdiff
path: root/py/mpstate.h
diff options
context:
space:
mode:
authoriabdalkader <i.abdalkader@gmail.com>2024-10-16 14:08:43 +0200
committerDamien George <damien@micropython.org>2024-10-25 01:12:36 +1100
commit2644f577f1562a641c62d223dfb1fd80dd541ac9 (patch)
tree4b749fe728b76ebee9b93de21c90f4659744b5fc /py/mpstate.h
parent09ea901317810e9e8fbd564cdbf8d50b3569d07f (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.h4
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.