mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-06 12:40:02 +00:00
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:
parent
9a4baa1336
commit
f6be590bf6
@ -5,6 +5,9 @@
|
|||||||
#include <test/macros.h>
|
#include <test/macros.h>
|
||||||
#include <test/helpers.h>
|
#include <test/helpers.h>
|
||||||
#include <test/random.h>
|
#include <test/random.h>
|
||||||
|
#if defined(MBEDTLS_PSA_CRYPTO_C)
|
||||||
|
#include <test/psa_crypto_helpers.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
@ -9,10 +9,6 @@
|
|||||||
#include "mbedtls/gcm.h"
|
#include "mbedtls/gcm.h"
|
||||||
#endif
|
#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)
|
#if defined(MBEDTLS_CIPHER_MODE_AEAD) || defined(MBEDTLS_NIST_KW_C)
|
||||||
#define MBEDTLS_CIPHER_AUTH_CRYPT
|
#define MBEDTLS_CIPHER_AUTH_CRYPT
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,13 +17,13 @@
|
|||||||
|
|
||||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||||
#include "mbedtls/psa_util.h"
|
#include "mbedtls/psa_util.h"
|
||||||
#include "test/psa_crypto_helpers.h"
|
|
||||||
#define PSA_INIT( ) PSA_ASSERT( psa_crypto_init( ) )
|
#define PSA_INIT( ) PSA_ASSERT( psa_crypto_init( ) )
|
||||||
#else
|
#else
|
||||||
/* Define empty macros so that we can use them in the preamble and teardown
|
/* Define empty macros so that we can use them in the preamble and teardown
|
||||||
* of every test function that uses PSA conditionally based on
|
* of every test function that uses PSA conditionally based on
|
||||||
* MBEDTLS_USE_PSA_CRYPTO. */
|
* MBEDTLS_USE_PSA_CRYPTO. */
|
||||||
#define PSA_INIT( ) ( (void) 0 )
|
#define PSA_INIT( ) ( (void) 0 )
|
||||||
|
#undef PSA_DONE
|
||||||
#define PSA_DONE( ) ( (void) 0 )
|
#define PSA_DONE( ) ( (void) 0 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -9,8 +9,6 @@
|
|||||||
* uses mbedtls_ctr_drbg internally. */
|
* uses mbedtls_ctr_drbg internally. */
|
||||||
#include "mbedtls/ctr_drbg.h"
|
#include "mbedtls/ctr_drbg.h"
|
||||||
|
|
||||||
#include "test/psa_crypto_helpers.h"
|
|
||||||
|
|
||||||
/* Tests that require more than 128kB of RAM plus change have this symbol
|
/* 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
|
* as a dependency. Currently we always define this symbol, so the tests
|
||||||
* are always executed. In the future we should make this conditional
|
* are always executed. In the future we should make this conditional
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
/* BEGIN_HEADER */
|
/* BEGIN_HEADER */
|
||||||
#include "test/psa_crypto_helpers.h"
|
|
||||||
|
|
||||||
#include "test/drivers/test_driver.h"
|
#include "test/drivers/test_driver.h"
|
||||||
/* END_HEADER */
|
/* END_HEADER */
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
#include "mbedtls/entropy.h"
|
#include "mbedtls/entropy.h"
|
||||||
#include "mbedtls/entropy_poll.h"
|
#include "mbedtls/entropy_poll.h"
|
||||||
|
|
||||||
#include "test/psa_crypto_helpers.h"
|
|
||||||
#if defined(MBEDTLS_PSA_ITS_FILE_C)
|
#if defined(MBEDTLS_PSA_ITS_FILE_C)
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#else
|
#else
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "test/psa_crypto_helpers.h"
|
|
||||||
|
|
||||||
/* END_HEADER */
|
/* END_HEADER */
|
||||||
|
|
||||||
/* BEGIN_DEPENDENCIES
|
/* BEGIN_DEPENDENCIES
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
/* BEGIN_HEADER */
|
/* BEGIN_HEADER */
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "test/psa_crypto_helpers.h"
|
|
||||||
/* Some tests in this module configure entropy sources. */
|
/* Some tests in this module configure entropy sources. */
|
||||||
#include "psa_crypto_invasive.h"
|
#include "psa_crypto_invasive.h"
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "test/psa_crypto_helpers.h"
|
|
||||||
#include "psa_crypto_slot_management.h"
|
#include "psa_crypto_slot_management.h"
|
||||||
#include "psa_crypto_storage.h"
|
#include "psa_crypto_storage.h"
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
/* BEGIN_HEADER */
|
/* BEGIN_HEADER */
|
||||||
#include "test/psa_crypto_helpers.h"
|
|
||||||
#include "psa/crypto_se_driver.h"
|
#include "psa/crypto_se_driver.h"
|
||||||
|
|
||||||
#include "psa_crypto_se.h"
|
#include "psa_crypto_se.h"
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
/* BEGIN_HEADER */
|
/* BEGIN_HEADER */
|
||||||
#include "test/psa_crypto_helpers.h"
|
|
||||||
#include "psa/crypto_se_driver.h"
|
#include "psa/crypto_se_driver.h"
|
||||||
|
|
||||||
#include "psa_crypto_se.h"
|
#include "psa_crypto_se.h"
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
/* BEGIN_HEADER */
|
/* BEGIN_HEADER */
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "test/psa_crypto_helpers.h"
|
|
||||||
#include "psa_crypto_slot_management.h"
|
#include "psa_crypto_slot_management.h"
|
||||||
#include "psa_crypto_storage.h"
|
#include "psa_crypto_storage.h"
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||||
#include "psa/crypto.h"
|
#include "psa/crypto.h"
|
||||||
#include "mbedtls/psa_util.h"
|
#include "mbedtls/psa_util.h"
|
||||||
#include "test/psa_crypto_helpers.h"
|
|
||||||
#define PSA_INIT( ) PSA_ASSERT( psa_crypto_init( ) )
|
#define PSA_INIT( ) PSA_ASSERT( psa_crypto_init( ) )
|
||||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user