blob: 0b6d6ca808f453d6e6260a5e573eaff9e41f6855 [file] [log] [blame]
Raymond Mao13de8482024-10-03 14:50:15 -07001# SPDX-License-Identifier: GPL-2.0+
2#
3# Copyright (c) 2024 Linaro Limited
4# Author: Raymond Mao <raymond.mao@linaro.org>
5
6MBEDTLS_LIB_DIR = external/mbedtls/library
7
8# MbedTLS crypto library
9obj-$(CONFIG_MBEDTLS_LIB) += mbedtls_lib_crypto.o
10mbedtls_lib_crypto-y := \
11 $(MBEDTLS_LIB_DIR)/platform_util.o \
12 $(MBEDTLS_LIB_DIR)/constant_time.o \
13 $(MBEDTLS_LIB_DIR)/md.o
14mbedtls_lib_crypto-$(CONFIG_$(SPL_)MD5) += $(MBEDTLS_LIB_DIR)/md5.o
15mbedtls_lib_crypto-$(CONFIG_$(SPL_)SHA1) += $(MBEDTLS_LIB_DIR)/sha1.o
16mbedtls_lib_crypto-$(CONFIG_$(SPL_)SHA256) += \
17 $(MBEDTLS_LIB_DIR)/sha256.o
18mbedtls_lib_crypto-$(CONFIG_$(SPL_)SHA512) += \
19 $(MBEDTLS_LIB_DIR)/sha512.o
20
21# MbedTLS X509 library
22obj-$(CONFIG_MBEDTLS_LIB_X509) += mbedtls_lib_x509.o
23mbedtls_lib_x509-y := $(MBEDTLS_LIB_DIR)/x509.o
24mbedtls_lib_x509-$(CONFIG_$(SPL_)ASN1_DECODER) += \
25 $(MBEDTLS_LIB_DIR)/asn1parse.o \
26 $(MBEDTLS_LIB_DIR)/asn1write.o \
27 $(MBEDTLS_LIB_DIR)/oid.o
28mbedtls_lib_x509-$(CONFIG_$(SPL_)RSA_PUBLIC_KEY_PARSER) += \
29 $(MBEDTLS_LIB_DIR)/bignum.o \
30 $(MBEDTLS_LIB_DIR)/bignum_core.o \
31 $(MBEDTLS_LIB_DIR)/rsa.o \
32 $(MBEDTLS_LIB_DIR)/rsa_alt_helpers.o
33mbedtls_lib_x509-$(CONFIG_$(SPL_)ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += \
34 $(MBEDTLS_LIB_DIR)/pk.o \
35 $(MBEDTLS_LIB_DIR)/pk_wrap.o \
36 $(MBEDTLS_LIB_DIR)/pkparse.o
37mbedtls_lib_x509-$(CONFIG_$(SPL_)X509_CERTIFICATE_PARSER) += \
38 $(MBEDTLS_LIB_DIR)/x509_crl.o \
39 $(MBEDTLS_LIB_DIR)/x509_crt.o
40mbedtls_lib_x509-$(CONFIG_$(SPL_)PKCS7_MESSAGE_PARSER) += \
41 $(MBEDTLS_LIB_DIR)/pkcs7.o