diff options
author | Jens Wiklander <jens.wiklander@linaro.org> | 2018-11-05 21:06:50 +0100 |
---|---|---|
committer | Jérôme Forissier <jerome.forissier@linaro.org> | 2018-11-14 15:32:01 +0100 |
commit | e789ada3f9c0e021452d6d933b284388a1e0f88f (patch) | |
tree | 7aeb40a3da15185e42ea21c42516c9b45e7a7843 /lib | |
parent | 98bd5fe350beee300c8292874158c5c95c69d59f (diff) |
core: switch to mbedtls for bignum
Adds a mpi_desc.c wrapper to LTC in order to enable usage of bignum
(mpi) routines from mbedtls.
CFG_MBEDTLS_MPI=y (default y) builds the bignum routines for mbedtls and
also enables their usage in LTC and by that replaces libmpa for
privileged mode usage.
User mode TAs still use libmpa.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libmbedtls/include/mbedtls_config_kernel.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libmbedtls/include/mbedtls_config_kernel.h b/lib/libmbedtls/include/mbedtls_config_kernel.h index 771795ce..fd8b223c 100644 --- a/lib/libmbedtls/include/mbedtls_config_kernel.h +++ b/lib/libmbedtls/include/mbedtls_config_kernel.h @@ -1,3 +1,13 @@ /* SPDX-License-Identifier: BSD-2-Clause */ /* Copyright (c) 2018, Linaro Limited */ -#error "mbedTLS is not yet supported in kernel mode" +#ifndef __MBEDTLS_CONFIG_KERNEL_H +#define __MBEDTLS_CONFIG_KERNEL_H + +#ifdef CFG_CORE_MBEDTLS_MPI +#define MBEDTLS_BIGNUM_C +#define MBEDTLS_GENPRIME +#endif + +#include <mbedtls/check_config.h> + +#endif /* __MBEDTLS_CONFIG_KERNEL_H */ |