Include psa_crypto_helpers.h in helpers.function

Include psa_crypto_helpers.h automatically if MBEDTLS_PSA_CRYPTO_C is
enabled, like helpers.h is included automatically.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2020-11-24 18:33:13 +01:00
parent 9a4baa1336
commit f6be590bf6
13 changed files with 4 additions and 18 deletions

View file

@ -5,6 +5,9 @@
#include <test/macros.h>
#include <test/helpers.h>
#include <test/random.h>
#if defined(MBEDTLS_PSA_CRYPTO_C)
#include <test/psa_crypto_helpers.h>
#endif
#include <stdlib.h>

View file

@ -9,10 +9,6 @@
#include "mbedtls/gcm.h"
#endif
#if defined(MBEDTLS_USE_PSA_CRYPTO)
#include "test/psa_crypto_helpers.h"
#endif
#if defined(MBEDTLS_CIPHER_MODE_AEAD) || defined(MBEDTLS_NIST_KW_C)
#define MBEDTLS_CIPHER_AUTH_CRYPT
#endif

View file

@ -17,13 +17,13 @@
#if defined(MBEDTLS_USE_PSA_CRYPTO)
#include "mbedtls/psa_util.h"
#include "test/psa_crypto_helpers.h"
#define PSA_INIT( ) PSA_ASSERT( psa_crypto_init( ) )
#else
/* Define empty macros so that we can use them in the preamble and teardown
* of every test function that uses PSA conditionally based on
* MBEDTLS_USE_PSA_CRYPTO. */
#define PSA_INIT( ) ( (void) 0 )
#undef PSA_DONE
#define PSA_DONE( ) ( (void) 0 )
#endif

View file

@ -9,8 +9,6 @@
* uses mbedtls_ctr_drbg internally. */
#include "mbedtls/ctr_drbg.h"
#include "test/psa_crypto_helpers.h"
/* Tests that require more than 128kB of RAM plus change have this symbol
* as a dependency. Currently we always define this symbol, so the tests
* are always executed. In the future we should make this conditional

View file

@ -1,6 +1,4 @@
/* BEGIN_HEADER */
#include "test/psa_crypto_helpers.h"
#include "test/drivers/test_driver.h"
/* END_HEADER */

View file

@ -4,7 +4,6 @@
#include "mbedtls/entropy.h"
#include "mbedtls/entropy_poll.h"
#include "test/psa_crypto_helpers.h"
#if defined(MBEDTLS_PSA_ITS_FILE_C)
#include <stdio.h>
#else

View file

@ -2,8 +2,6 @@
#include <stdint.h>
#include "test/psa_crypto_helpers.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,7 +1,6 @@
/* BEGIN_HEADER */
#include <stdint.h>
#include "test/psa_crypto_helpers.h"
/* Some tests in this module configure entropy sources. */
#include "psa_crypto_invasive.h"

View file

@ -9,7 +9,6 @@
#include <stdint.h>
#include "test/psa_crypto_helpers.h"
#include "psa_crypto_slot_management.h"
#include "psa_crypto_storage.h"

View file

@ -1,5 +1,4 @@
/* BEGIN_HEADER */
#include "test/psa_crypto_helpers.h"
#include "psa/crypto_se_driver.h"
#include "psa_crypto_se.h"

View file

@ -1,5 +1,4 @@
/* BEGIN_HEADER */
#include "test/psa_crypto_helpers.h"
#include "psa/crypto_se_driver.h"
#include "psa_crypto_se.h"

View file

@ -1,7 +1,6 @@
/* BEGIN_HEADER */
#include <stdint.h>
#include "test/psa_crypto_helpers.h"
#include "psa_crypto_slot_management.h"
#include "psa_crypto_storage.h"

View file

@ -9,7 +9,6 @@
#if defined(MBEDTLS_USE_PSA_CRYPTO)
#include "psa/crypto.h"
#include "mbedtls/psa_util.h"
#include "test/psa_crypto_helpers.h"
#define PSA_INIT( ) PSA_ASSERT( psa_crypto_init( ) )
#endif /* MBEDTLS_USE_PSA_CRYPTO */