mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-08-29 22:39:54 +00:00
Move "libtestdriver1_" aliases to test_driver_common.h
Signed-off-by: Ronald Cron <[email protected]>
This commit is contained in:
@@ -25,4 +25,27 @@
|
||||
|
||||
/* *INDENT-ON* */
|
||||
|
||||
/*
|
||||
* In the libtestdriver1 library used in Mbed TLS 3.6 and 4.0 for driver
|
||||
* dispatch testing, the PSA core code is cloned and all identifiers starting
|
||||
* with MBEDTLS_, PSA_, mbedtls_, or psa_ are prefixed with `libtestdriver1_`.
|
||||
* As a result, libtestdriver1 drivers use, for example,
|
||||
* `libtestdriver1_psa_key_attributes_t` instead of `psa_key_attributes_t`.
|
||||
*
|
||||
* With the generated test drivers introduced in TF-PSA-Crypto between 1.0
|
||||
* and 1.1, only the modules under `drivers/builtin` are cloned, not the PSA
|
||||
* core. The generated test drivers therefore do not use prefixed PSA core
|
||||
* identifiers. For example, they use the `psa_key_attributes_t` type, just
|
||||
* like the built-in drivers.
|
||||
*
|
||||
* To make driver dispatch work in both cases, we define certain
|
||||
* `libtestdriver1_xyz` identifiers as aliases of the corresponding `xyz`
|
||||
* identifiers in the latter case.
|
||||
*/
|
||||
#if defined(TF_PSA_CRYPTO_TEST_LIBTESTDRIVER1)
|
||||
typedef psa_key_attributes_t libtestdriver1_psa_key_attributes_t;
|
||||
typedef psa_crypto_driver_pake_inputs_t libtestdriver1_psa_crypto_driver_pake_inputs_t;
|
||||
typedef psa_crypto_driver_pake_step_t libtestdriver1_psa_crypto_driver_pake_step_t;
|
||||
#endif
|
||||
|
||||
#endif /* test_driver_common.h */
|
||||
|
||||
Reference in New Issue
Block a user