diff options
author | Qixiang Xu <qixiang.xu@arm.com> | 2017-11-09 13:56:29 +0800 |
---|---|---|
committer | Qixiang Xu <qixiang.xu@arm.com> | 2017-11-21 14:16:18 +0800 |
commit | 9a3088a5f509084e60d9c55bf53985c5ec4ca821 (patch) | |
tree | b3e7af650e56d8ab6df9a04c0253000dc20b7160 /include | |
parent | 2972247cb4ae84ed660532cac426259a4f17c816 (diff) | |
download | platform_external_arm-trusted-firmware-9a3088a5f509084e60d9c55bf53985c5ec4ca821.tar.gz platform_external_arm-trusted-firmware-9a3088a5f509084e60d9c55bf53985c5ec4ca821.tar.bz2 platform_external_arm-trusted-firmware-9a3088a5f509084e60d9c55bf53985c5ec4ca821.zip |
tbbr: Add build flag HASH_ALG to let the user to select the SHA
The flag support the following values:
- sha256 (default)
- sha384
- sha512
Change-Id: I7a49d858c361e993949cf6ada0a86575c3291066
Signed-off-by: Qixiang Xu <qixiang.xu@arm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/drivers/auth/mbedtls/mbedtls_config.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/drivers/auth/mbedtls/mbedtls_config.h b/include/drivers/auth/mbedtls/mbedtls_config.h index 96587acae..f8f260808 100644 --- a/include/drivers/auth/mbedtls/mbedtls_config.h +++ b/include/drivers/auth/mbedtls/mbedtls_config.h @@ -14,6 +14,13 @@ #define TF_MBEDTLS_RSA_AND_ECDSA 3 /* + * Hash algorithms currently supported on mbed TLS libraries + */ +#define TF_MBEDTLS_SHA256 1 +#define TF_MBEDTLS_SHA384 2 +#define TF_MBEDTLS_SHA512 3 + +/* * Configuration file to build mbed TLS with the required features for * Trusted Boot */ @@ -66,6 +73,9 @@ #endif #define MBEDTLS_SHA256_C +#if (TF_MBEDTLS_HASH_ALG_ID != TF_MBEDTLS_SHA256) +#define MBEDTLS_SHA512_C +#endif #define MBEDTLS_VERSION_C |