1 /* 2 * Copyright (c) 2023, Arm Ltd. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef PSA_MBEDTLS_CONFIG_H 8 #define PSA_MBEDTLS_CONFIG_H 9 10 #include "mbedtls_config-3.h" 11 12 #define MBEDTLS_PSA_CRYPTO_C 13 14 /* 15 * Using PSA crypto API requires an RNG right now. If we don't define the macro 16 * below then we get build errors. 17 * 18 * This is a functionality gap in mbedTLS. The technical limitation is that 19 * psa_crypto_init() is all-or-nothing, and fixing that would require separate 20 * initialization of the keystore, the RNG, etc. 21 * 22 * By defining MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG, we pretend using an external 23 * RNG. As a result, the PSA crypto init code does nothing when it comes to 24 * initializing the RNG, as we are supposed to take care of that ourselves. 25 */ 26 #define MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG 27 28 #endif /* PSA_MBEDTLS_CONFIG_H */ 29