-
Notifications
You must be signed in to change notification settings - Fork 911
Expand file tree
/
Copy pathrsa.cmake
More file actions
30 lines (29 loc) · 1.12 KB
/
rsa.cmake
File metadata and controls
30 lines (29 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd.
#
# SPDX-License-Identifier: Apache-2.0
if (DEFINED CONFIG_ESP_USE_MBEDTLS)
set(MBEDTLS_DIR ${MCUBOOT_ROOT_DIR}/ext/mbedtls-3.6.0)
set(CRYPTO_INC
${MBEDTLS_DIR}/include
)
set(crypto_srcs
${ESPRESSIF_PORT_DIR}/keys.c
${MBEDTLS_DIR}/library/platform.c
${MBEDTLS_DIR}/library/platform_util.c
${MBEDTLS_DIR}/library/sha256.c
${MBEDTLS_DIR}/library/rsa.c
${MBEDTLS_DIR}/library/bignum.c
${MBEDTLS_DIR}/library/bignum_core.c
${MBEDTLS_DIR}/library/constant_time.c
${MBEDTLS_DIR}/library/asn1parse.c
${MBEDTLS_DIR}/library/md.c
${MBEDTLS_DIR}/library/memory_buffer_alloc.c
)
if (DEFINED MBEDTLS_CONFIG_FILE)
add_definitions(-DMBEDTLS_CONFIG_FILE=\"${MBEDTLS_CONFIG_FILE}\")
else()
add_definitions(-DMBEDTLS_CONFIG_FILE=\"${ESPRESSIF_PORT_DIR}/include/crypto_config/mbedtls_custom_config.h\")
endif()
elseif (DEFINED CONFIG_ESP_USE_TINYCRYPT)
message(FATAL_ERROR "RSA signature verification using Tinycrypt lib is not supported")
endif()