Fix missing compilation guard around psa_crypto_driver_wrappers.c

Fix #4411.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2021-04-24 13:19:45 +02:00
parent 2213871654
commit 1905a24488
2 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Bugfix
* With MBEDTLS_PSA_CRYPTO_C disabled, some functions were getting built
nonetheless, resulting in undefined reference errors when building a
shared library. Reported by Guillermo Garcia M. in #4411.

View File

@ -28,6 +28,8 @@
#include "mbedtls/platform.h" #include "mbedtls/platform.h"
#if defined(MBEDTLS_PSA_CRYPTO_C)
#if defined(MBEDTLS_PSA_CRYPTO_DRIVERS) #if defined(MBEDTLS_PSA_CRYPTO_DRIVERS)
/* Include test driver definition when running tests */ /* Include test driver definition when running tests */
@ -1777,4 +1779,5 @@ psa_status_t psa_driver_wrapper_mac_abort(
return( PSA_ERROR_INVALID_ARGUMENT ); return( PSA_ERROR_INVALID_ARGUMENT );
} }
} }
/* End of automatically generated file. */
#endif /* MBEDTLS_PSA_CRYPTO_C */