mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-20 19:21:09 +01:00
Adjust guard for 3.6
In all.sh component test_psa_crypto_config_accel_rsa_crypto, where RSA is provided only by a drivers, we were using a stack buffer. However that was not correct, as "opaque" (PSA-held) RSA keys are still possible. This was pointed by failing test cases in test_suite_pk, such as "PSA import into PSA: opaque RSA, EXPORT (ok)". As usual with 3.6, we need more complicated pre-processor conditions. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
@@ -51,8 +51,11 @@
|
||||
*
|
||||
* The current compromise is that if ECC is the only key type supported in PK,
|
||||
* then we export keys on the stack, and otherwise we use the heap.
|
||||
*
|
||||
* RSA can either be used directly or indirectly via opaque keys if enabled.
|
||||
*/
|
||||
#if !defined(MBEDTLS_RSA_C)
|
||||
#if !defined(MBEDTLS_RSA_C) && \
|
||||
!(defined(MBEDTLS_USE_PSA_CRYPTO) && defined(PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY))
|
||||
#define PK_EXPORT_KEYS_ON_THE_STACK
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user