Skip to content

Commit

Permalink
Fix missing compilation guard around psa_crypto_driver_wrappers.c
Browse files Browse the repository at this point in the history
Fix Mbed-TLS#4411.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
  • Loading branch information
gilles-peskine-arm committed Apr 24, 2021
1 parent 1c4e784 commit fe19d00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog.d/undefined_reference_without_psa.txt
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 3 additions & 1 deletion library/psa_crypto_driver_wrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "psa_crypto_driver_wrappers.h"
#include "mbedtls/platform.h"

#if defined(MBEDTLS_PSA_CRYPTO_C)

#if defined(MBEDTLS_PSA_CRYPTO_DRIVERS)

/* Include test driver definition when running tests */
Expand Down Expand Up @@ -1082,4 +1084,4 @@ psa_status_t psa_driver_wrapper_cipher_abort(
#endif /* PSA_CRYPTO_DRIVER_PRESENT */
}

/* End of automatically generated file. */
#endif /* MBEDTLS_PSA_CRYPTO_C */

0 comments on commit fe19d00

Please sign in to comment.