blob: ad825f0aa7669af6019454fca7e4ae6b368fb4f8 [file] [log] [blame]
Manish V Badarkhe78e14f82023-09-06 09:08:28 +01001/*
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
Manish V Badarkhef179aa92023-09-06 11:01:37 +010014/*
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
Manish V Badarkhe78e14f82023-09-06 09:08:28 +010028#endif /* PSA_MBEDTLS_CONFIG_H */