1 /*
2  * Copyright (c) 2020-2023, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef CONFIG_CRYPTO_PROVIDER_X509_H
8 #define CONFIG_CRYPTO_PROVIDER_X509_H
9 
10 /*
11  * MbedTLS configuration for building libmbedcrypto and libx509 to act as a backend
12  * for the crypto service provider.
13  */
14 
15 /*
16  * Enable using crypto_config.h, but do not define custom crypto header with
17  * MBEDTLS_PSA_CRYPTO_CONFIG_FILE to enable all the supported algorithms.
18  */
19 #define MBEDTLS_PSA_CRYPTO_CONFIG
20 
21 #define MBEDTLS_BASE64_C
22 #define MBEDTLS_BIGNUM_C
23 #define MBEDTLS_ECP_NIST_OPTIM
24 #define MBEDTLS_ENTROPY_C
25 #define MBEDTLS_ENTROPY_HARDWARE_ALT
26 #define MBEDTLS_GENPRIME
27 #define MBEDTLS_HAVE_ASM
28 #define MBEDTLS_LMS_C
29 #define MBEDTLS_NIST_KW_C
30 #define MBEDTLS_NO_PLATFORM_ENTROPY
31 #define MBEDTLS_NO_UDBL_DIVISION
32 #define MBEDTLS_OID_C
33 #define MBEDTLS_ASN1_PARSE_C
34 #define MBEDTLS_PEM_PARSE_C
35 #define MBEDTLS_PEM_WRITE_C
36 #define MBEDTLS_PKCS12_C
37 #define MBEDTLS_PKCS5_C
38 #define MBEDTLS_PKCS7_C
39 #define MBEDTLS_PK_C
40 #define MBEDTLS_PK_PARSE_C
41 #define MBEDTLS_PK_WRITE_C
42 #define MBEDTLS_PSA_CRYPTO_C
43 #define MBEDTLS_PSA_CRYPTO_STORAGE_C
44 #define MBEDTLS_X509_CRL_PARSE_C
45 #define MBEDTLS_X509_CRT_PARSE_C
46 #define MBEDTLS_X509_USE_C
47 
48 #define MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER
49 #define BACKEND_CRYPTO_API_ADD_PREFIX(f) __mbedtls_backend_##f
50 #include "../../../components/service/crypto/backend/prefixed_crypto_api.h"
51 
52 #endif /* CONFIG_CRYPTO_PROVIDER_X509_H */
53