Commit 0aff7ad2 authored by David Cunado's avatar David Cunado
Browse files

mbedtls: Complete namespace for TF specific macros



This patch renames MBEDTLS_KEY_ALG to TF_MBEDTLS_KEY_ALG. This
completes the migration of TF specific macros so that they do not
have the MBEDTLS_ suffix (see arm-trusted-firmware#874).

Change-Id: Iad7632477e220b0af987c4db3cf52229fb127d00
Signed-off-by: default avatarDavid Cunado <david.cunado@arm.com>
parent b1883510
...@@ -6,10 +6,20 @@ ...@@ -6,10 +6,20 @@
include drivers/auth/mbedtls/mbedtls_common.mk include drivers/auth/mbedtls/mbedtls_common.mk
# The platform may define the variable 'MBEDTLS_KEY_ALG' to select the key # The platform may define the variable 'TF_MBEDTLS_KEY_ALG' to select the key
# algorithm to use. Default algorithm is RSA. # algorithm to use. Default algorithm is RSA.
ifeq (${MBEDTLS_KEY_ALG},) ifeq (${TF_MBEDTLS_KEY_ALG},)
MBEDTLS_KEY_ALG := rsa TF_MBEDTLS_KEY_ALG := rsa
endif
# If MBEDTLS_KEY_ALG build flag is defined use it to set TF_MBEDTLS_KEY_ALG for
# backward compatibility
ifdef MBEDTLS_KEY_ALG
ifeq (${ERROR_DEPRECATED},1)
$(error "MBEDTLS_KEY_ALG is deprecated. Please use the new build flag TF_MBEDTLS_KEY_ALG")
endif
$(warning "MBEDTLS_KEY_ALG is deprecated. Please use the new build flag TF_MBEDTLS_KEY_ALG")
TF_MBEDTLS_KEY_ALG := ${MBEDTLS_KEY_ALG}
endif endif
MBEDTLS_CRYPTO_SOURCES := drivers/auth/mbedtls/mbedtls_crypto.c \ MBEDTLS_CRYPTO_SOURCES := drivers/auth/mbedtls/mbedtls_crypto.c \
...@@ -25,20 +35,20 @@ MBEDTLS_CRYPTO_SOURCES := drivers/auth/mbedtls/mbedtls_crypto.c \ ...@@ -25,20 +35,20 @@ MBEDTLS_CRYPTO_SOURCES := drivers/auth/mbedtls/mbedtls_crypto.c \
) )
# Key algorithm specific files # Key algorithm specific files
ifeq (${MBEDTLS_KEY_ALG},ecdsa) ifeq (${TF_MBEDTLS_KEY_ALG},ecdsa)
MBEDTLS_CRYPTO_SOURCES += $(addprefix ${MBEDTLS_DIR}/library/, \ MBEDTLS_CRYPTO_SOURCES += $(addprefix ${MBEDTLS_DIR}/library/, \
ecdsa.c \ ecdsa.c \
ecp_curves.c \ ecp_curves.c \
ecp.c \ ecp.c \
) )
TF_MBEDTLS_KEY_ALG_ID := TF_MBEDTLS_ECDSA TF_MBEDTLS_KEY_ALG_ID := TF_MBEDTLS_ECDSA
else ifeq (${MBEDTLS_KEY_ALG},rsa) else ifeq (${TF_MBEDTLS_KEY_ALG},rsa)
MBEDTLS_CRYPTO_SOURCES += $(addprefix ${MBEDTLS_DIR}/library/, \ MBEDTLS_CRYPTO_SOURCES += $(addprefix ${MBEDTLS_DIR}/library/, \
rsa.c \ rsa.c \
) )
TF_MBEDTLS_KEY_ALG_ID := TF_MBEDTLS_RSA TF_MBEDTLS_KEY_ALG_ID := TF_MBEDTLS_RSA
else else
$(error "MBEDTLS_KEY_ALG=${MBEDTLS_KEY_ALG} not supported on mbed TLS") $(error "TF_MBEDTLS_KEY_ALG=${TF_MBEDTLS_KEY_ALG} not supported on mbed TLS")
endif endif
# Needs to be set to drive mbed TLS configuration correctly # Needs to be set to drive mbed TLS configuration correctly
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment