summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authordavidcunado-arm <david.cunado@arm.com>2017-09-07 01:14:24 +0100
committerGitHub <noreply@github.com>2017-09-07 01:14:24 +0100
commit5457874575a67b08606a35682e1dd9a5ebb984e8 (patch)
treef45f67c4f0a29d928e47367825149988bd789d0f /drivers
parent2867ca37074d18a171e4a22a72e77fa612096d4c (diff)
parenta8eb286adaa73e86305317b9cae15d41c57de8e7 (diff)
Merge pull request #1080 from soby-mathew/eb/RSA-PKCS1-5_support_1
Support legacy RSA PKCS#1 v1.5 in cert create
Diffstat (limited to 'drivers')
-rw-r--r--drivers/auth/mbedtls/mbedtls_crypto.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/auth/mbedtls/mbedtls_crypto.mk b/drivers/auth/mbedtls/mbedtls_crypto.mk
index cb81d4d6..21b857bf 100644
--- a/drivers/auth/mbedtls/mbedtls_crypto.mk
+++ b/drivers/auth/mbedtls/mbedtls_crypto.mk
@@ -7,9 +7,15 @@
include drivers/auth/mbedtls/mbedtls_common.mk
# The platform may define the variable 'TF_MBEDTLS_KEY_ALG' to select the key
-# algorithm to use. Default algorithm is RSA.
+# algorithm to use. If the variable is not defined, select it based on algorithm
+# used for key generation `KEY_ALG`. If `KEY_ALG` is not defined or is
+# defined to `rsa`/`rsa_1_5`, then set the variable to `rsa`.
ifeq (${TF_MBEDTLS_KEY_ALG},)
- TF_MBEDTLS_KEY_ALG := rsa
+ ifeq (${KEY_ALG}, ecdsa)
+ TF_MBEDTLS_KEY_ALG := ecdsa
+ else
+ TF_MBEDTLS_KEY_ALG := rsa
+ endif
endif
# If MBEDTLS_KEY_ALG build flag is defined use it to set TF_MBEDTLS_KEY_ALG for