mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-27 07:15:20 +00:00

To make software license auditing simpler, use SPDX[0] license identifiers instead of duplicating the license text in every file. NOTE: Files that have been imported by FreeBSD have not been modified. [0]: https://spdx.org/ Change-Id: I80a00e1f641b8cc075ca5a95b10607ed9ed8761a Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
75 lines
1.6 KiB
C
75 lines
1.6 KiB
C
/*
|
|
* Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
#ifndef __MBEDTLS_CONFIG_H__
|
|
#define __MBEDTLS_CONFIG_H__
|
|
|
|
/*
|
|
* Key algorithms currently supported on mbed TLS libraries
|
|
*/
|
|
#define TBBR_RSA 1
|
|
#define TBBR_ECDSA 2
|
|
|
|
/*
|
|
* Configuration file to build mbed TLS with the required features for
|
|
* Trusted Boot
|
|
*/
|
|
|
|
#define MBEDTLS_PLATFORM_MEMORY
|
|
#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
|
|
|
|
#define MBEDTLS_PKCS1_V15
|
|
#define MBEDTLS_PKCS1_V21
|
|
|
|
#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
|
|
#define MBEDTLS_X509_CHECK_KEY_USAGE
|
|
#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
|
|
|
|
#define MBEDTLS_ASN1_PARSE_C
|
|
#define MBEDTLS_ASN1_WRITE_C
|
|
|
|
#define MBEDTLS_BASE64_C
|
|
#define MBEDTLS_BIGNUM_C
|
|
|
|
#define MBEDTLS_ERROR_C
|
|
#define MBEDTLS_MD_C
|
|
|
|
#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
|
|
#define MBEDTLS_OID_C
|
|
|
|
#define MBEDTLS_PK_C
|
|
#define MBEDTLS_PK_PARSE_C
|
|
#define MBEDTLS_PK_WRITE_C
|
|
|
|
#define MBEDTLS_PLATFORM_C
|
|
|
|
#if (TBBR_KEY_ALG_ID == TBBR_ECDSA)
|
|
#define MBEDTLS_ECDSA_C
|
|
#define MBEDTLS_ECP_C
|
|
#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
|
|
#elif (TBBR_KEY_ALG_ID == TBBR_RSA)
|
|
#define MBEDTLS_RSA_C
|
|
#endif
|
|
|
|
#define MBEDTLS_SHA256_C
|
|
|
|
#define MBEDTLS_VERSION_C
|
|
|
|
#define MBEDTLS_X509_USE_C
|
|
#define MBEDTLS_X509_CRT_PARSE_C
|
|
|
|
/* MPI / BIGNUM options */
|
|
#define MBEDTLS_MPI_WINDOW_SIZE 2
|
|
#define MBEDTLS_MPI_MAX_SIZE 256
|
|
|
|
/* Memory buffer allocator options */
|
|
#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 8
|
|
|
|
#include "mbedtls/check_config.h"
|
|
|
|
/* System headers required to build mbed TLS with the current configuration */
|
|
#include <stdlib.h>
|
|
|
|
#endif /* __MBEDTLS_CONFIG_H__ */
|