mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-11 14:15:39 +00:00
Fix guard controlling whether nested acquire calls are allowed
Resource counting as a safe-guard against nested acquire calls is implemented if and only if MBEDTLS_X509_ALWAYS_FLUSH is disabled _or_ MBEDTLS_THREADING_C is enabled.
This commit is contained in:
parent
7ab8a2e2a0
commit
410322f23e
|
@ -193,7 +193,8 @@ int mbedtls_x509_crt_cache_provide_frame( mbedtls_x509_crt const *crt )
|
|||
|
||||
if( cache->frame != NULL )
|
||||
{
|
||||
#if !defined(MBEDTLS_X509_ALWAYS_FLUSH)
|
||||
#if !defined(MBEDTLS_X509_ALWAYS_FLUSH) || \
|
||||
defined(MBEDTLS_THREADING_C)
|
||||
return( 0 );
|
||||
#else
|
||||
/* If MBEDTLS_X509_ALWAYS_FLUSH is set, we don't
|
||||
|
@ -253,7 +254,8 @@ int mbedtls_x509_crt_cache_provide_pk( mbedtls_x509_crt const *crt )
|
|||
|
||||
if( cache->pk != NULL )
|
||||
{
|
||||
#if !defined(MBEDTLS_X509_ALWAYS_FLUSH)
|
||||
#if !defined(MBEDTLS_X509_ALWAYS_FLUSH) || \
|
||||
defined(MBEDTLS_THREADING_C)
|
||||
return( 0 );
|
||||
#else
|
||||
/* If MBEDTLS_X509_ALWAYS_FLUSH is set, we don't
|
||||
|
|
Loading…
Reference in a new issue