/openthread-3.5.0/third_party/mbedtls/repo/tests/src/ |
D | threading_helpers.c | 101 static void mbedtls_test_mutex_usage_error( mbedtls_threading_mutex_t *mutex, in mbedtls_test_mutex_usage_error() argument 104 (void) mutex; in mbedtls_test_mutex_usage_error() 114 static void mbedtls_test_wrap_mutex_init( mbedtls_threading_mutex_t *mutex ) in mbedtls_test_wrap_mutex_init() argument 116 mutex_functions.init( mutex ); in mbedtls_test_wrap_mutex_init() 117 if( mutex->is_valid ) in mbedtls_test_wrap_mutex_init() 121 static void mbedtls_test_wrap_mutex_free( mbedtls_threading_mutex_t *mutex ) in mbedtls_test_wrap_mutex_free() argument 123 switch( mutex->is_valid ) in mbedtls_test_wrap_mutex_free() 126 mbedtls_test_mutex_usage_error( mutex, "free without init or double free" ); in mbedtls_test_wrap_mutex_free() 133 mbedtls_test_mutex_usage_error( mutex, "free without unlock" ); in mbedtls_test_wrap_mutex_free() 136 mbedtls_test_mutex_usage_error( mutex, "corrupted state" ); in mbedtls_test_wrap_mutex_free() [all …]
|
/openthread-3.5.0/third_party/mbedtls/repo/library/ |
D | threading.c | 65 static void threading_mutex_init_pthread( mbedtls_threading_mutex_t *mutex ) in threading_mutex_init_pthread() argument 67 if( mutex == NULL ) in threading_mutex_init_pthread() 76 mutex->is_valid = pthread_mutex_init( &mutex->mutex, NULL ) == 0; in threading_mutex_init_pthread() 79 static void threading_mutex_free_pthread( mbedtls_threading_mutex_t *mutex ) in threading_mutex_free_pthread() argument 81 if( mutex == NULL || !mutex->is_valid ) in threading_mutex_free_pthread() 84 (void) pthread_mutex_destroy( &mutex->mutex ); in threading_mutex_free_pthread() 85 mutex->is_valid = 0; in threading_mutex_free_pthread() 88 static int threading_mutex_lock_pthread( mbedtls_threading_mutex_t *mutex ) in threading_mutex_lock_pthread() argument 90 if( mutex == NULL || ! mutex->is_valid ) in threading_mutex_lock_pthread() 93 if( pthread_mutex_lock( &mutex->mutex ) != 0 ) in threading_mutex_lock_pthread() [all …]
|
D | ssl_cookie.c | 79 mbedtls_mutex_init( &ctx->mutex ); in mbedtls_ssl_cookie_init() 93 mbedtls_mutex_free( &ctx->mutex ); in mbedtls_ssl_cookie_free() 174 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_ssl_cookie_write() 182 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_ssl_cookie_write() 210 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_ssl_cookie_check() 220 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_ssl_cookie_check()
|
D | ssl_cache.c | 49 mbedtls_mutex_init( &cache->mutex ); in mbedtls_ssl_cache_init() 63 if( mbedtls_mutex_lock( &cache->mutex ) != 0 ) in mbedtls_ssl_cache_get() 131 if( mbedtls_mutex_unlock( &cache->mutex ) != 0 ) in mbedtls_ssl_cache_get() 150 if( ( ret = mbedtls_mutex_lock( &cache->mutex ) ) != 0 ) in mbedtls_ssl_cache_set() 295 if( mbedtls_mutex_unlock( &cache->mutex ) != 0 ) in mbedtls_ssl_cache_set() 340 mbedtls_mutex_free( &cache->mutex ); in mbedtls_ssl_cache_free()
|
D | entropy.c | 66 mbedtls_mutex_init( &ctx->mutex ); in mbedtls_entropy_init() 128 mbedtls_mutex_free( &ctx->mutex ); in mbedtls_entropy_free() 150 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_entropy_add_source() 170 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_entropy_add_source() 242 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_entropy_update_manual() 249 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_entropy_update_manual() 314 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_entropy_gather() 321 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_entropy_gather() 351 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_entropy_func() 443 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_entropy_func()
|
D | ssl_ticket.c | 47 mbedtls_mutex_init( &ctx->mutex ); in mbedtls_ssl_ticket_init() 224 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_ssl_ticket_write() 271 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_ssl_ticket_write() 318 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_ssl_ticket_parse() 382 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_ssl_ticket_parse() 398 mbedtls_mutex_free( &ctx->mutex ); in mbedtls_ssl_ticket_free()
|
D | memory_buffer_alloc.c | 77 mbedtls_threading_mutex_t mutex; member 548 if( mbedtls_mutex_lock( &heap.mutex ) != 0 ) in buffer_alloc_calloc_mutexed() 551 if( mbedtls_mutex_unlock( &heap.mutex ) ) in buffer_alloc_calloc_mutexed() 560 if( mbedtls_mutex_lock( &heap.mutex ) ) in buffer_alloc_free_mutexed() 563 (void) mbedtls_mutex_unlock( &heap.mutex ); in buffer_alloc_free_mutexed() 572 mbedtls_mutex_init( &heap.mutex ); in mbedtls_memory_buffer_alloc_init() 605 mbedtls_mutex_free( &heap.mutex ); in mbedtls_memory_buffer_alloc_free()
|
D | hmac_drbg.c | 129 mbedtls_mutex_init( &ctx->mutex ); in mbedtls_hmac_drbg_seed_buf() 259 mbedtls_mutex_init( &ctx->mutex ); in mbedtls_hmac_drbg_seed() 405 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_hmac_drbg_random() 412 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_hmac_drbg_random() 431 mbedtls_mutex_free( &ctx->mutex ); in mbedtls_hmac_drbg_free()
|
D | ctr_drbg.c | 73 mbedtls_mutex_free( &ctx->mutex ); in mbedtls_ctr_drbg_free() 461 mbedtls_mutex_init( &ctx->mutex ); in mbedtls_ctr_drbg_seed() 598 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_ctr_drbg_random() 605 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_ctr_drbg_random()
|
D | rsa.c | 482 mbedtls_mutex_init( &ctx->mutex ); in mbedtls_rsa_init() 734 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_rsa_public() 752 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_rsa_public() 905 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_rsa_private() 1047 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_rsa_private() 2372 mbedtls_mutex_free( &ctx->mutex ); in mbedtls_rsa_free()
|
/openthread-3.5.0/third_party/mbedtls/repo/include/mbedtls/ |
D | threading.h | 51 pthread_mutex_t mutex; member 98 extern void (*mbedtls_mutex_init)( mbedtls_threading_mutex_t *mutex ); 99 extern void (*mbedtls_mutex_free)( mbedtls_threading_mutex_t *mutex ); 100 extern int (*mbedtls_mutex_lock)( mbedtls_threading_mutex_t *mutex ); 101 extern int (*mbedtls_mutex_unlock)( mbedtls_threading_mutex_t *mutex );
|
D | ssl_cookie.h | 67 mbedtls_threading_mutex_t mutex; member
|
D | ssl_ticket.h | 74 mbedtls_threading_mutex_t mutex; member
|
D | ssl_cache.h | 87 mbedtls_threading_mutex_t mutex; /*!< mutex */ member
|
D | entropy.h | 142 mbedtls_threading_mutex_t mutex; /*!< mutex */ member
|
D | hmac_drbg.h | 116 mbedtls_threading_mutex_t mutex; member
|
D | ctr_drbg.h | 214 mbedtls_threading_mutex_t mutex; member
|
D | rsa.h | 145 mbedtls_threading_mutex_t mutex; /*!< Thread-safety mutex. */ member
|
/openthread-3.5.0/third_party/mbedtls/repo/tests/suites/ |
D | test_suite_psa_crypto_init.function | 73 mbedtls_mutex_init( &ctx->mutex );
|
/openthread-3.5.0/third_party/mbedtls/repo/ |
D | ChangeLog | 407 is enabled, on platforms where initializing a mutex allocates resources. 413 enabled on platforms where freeing a mutex twice is not safe. 416 a mutex allocates resources. 2742 result trying to unlock an unlocked mutex on invalid input (found by
|