Raymond Mao | 13de848 | 2024-10-03 14:50:15 -0700 | [diff] [blame^] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
| 2 | # |
| 3 | # Copyright (c) 2024 Linaro Limited |
| 4 | # Author: Raymond Mao <raymond.mao@linaro.org> |
| 5 | |
| 6 | MBEDTLS_LIB_DIR = external/mbedtls/library |
| 7 | |
| 8 | # MbedTLS crypto library |
| 9 | obj-$(CONFIG_MBEDTLS_LIB) += mbedtls_lib_crypto.o |
| 10 | mbedtls_lib_crypto-y := \ |
| 11 | $(MBEDTLS_LIB_DIR)/platform_util.o \ |
| 12 | $(MBEDTLS_LIB_DIR)/constant_time.o \ |
| 13 | $(MBEDTLS_LIB_DIR)/md.o |
| 14 | mbedtls_lib_crypto-$(CONFIG_$(SPL_)MD5) += $(MBEDTLS_LIB_DIR)/md5.o |
| 15 | mbedtls_lib_crypto-$(CONFIG_$(SPL_)SHA1) += $(MBEDTLS_LIB_DIR)/sha1.o |
| 16 | mbedtls_lib_crypto-$(CONFIG_$(SPL_)SHA256) += \ |
| 17 | $(MBEDTLS_LIB_DIR)/sha256.o |
| 18 | mbedtls_lib_crypto-$(CONFIG_$(SPL_)SHA512) += \ |
| 19 | $(MBEDTLS_LIB_DIR)/sha512.o |
| 20 | |
| 21 | # MbedTLS X509 library |
| 22 | obj-$(CONFIG_MBEDTLS_LIB_X509) += mbedtls_lib_x509.o |
| 23 | mbedtls_lib_x509-y := $(MBEDTLS_LIB_DIR)/x509.o |
| 24 | mbedtls_lib_x509-$(CONFIG_$(SPL_)ASN1_DECODER) += \ |
| 25 | $(MBEDTLS_LIB_DIR)/asn1parse.o \ |
| 26 | $(MBEDTLS_LIB_DIR)/asn1write.o \ |
| 27 | $(MBEDTLS_LIB_DIR)/oid.o |
| 28 | mbedtls_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 |
| 33 | mbedtls_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 |
| 37 | mbedtls_lib_x509-$(CONFIG_$(SPL_)X509_CERTIFICATE_PARSER) += \ |
| 38 | $(MBEDTLS_LIB_DIR)/x509_crl.o \ |
| 39 | $(MBEDTLS_LIB_DIR)/x509_crt.o |
| 40 | mbedtls_lib_x509-$(CONFIG_$(SPL_)PKCS7_MESSAGE_PARSER) += \ |
| 41 | $(MBEDTLS_LIB_DIR)/pkcs7.o |