Browse Source

fix(tbbr): guard defines under MBEDTLS_CONFIG_FILE

Several platforms, such as NXP platforms, employ Trusted Boot support
without relying on MBEDTLS_CONFIG. This patch addresses the build
issues that arose on such platforms as a result of recent change
c1ec23dd60 [1].

[1]: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/23730

Change-Id: Idfbeeafb8a30dc15bb0060beb5b17819a8807084
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
pull/1993/merge
Manish V Badarkhe 1 year ago
parent
commit
81c2e1566d
  1. 6
      include/common/tbbr/cot_def.h

6
include/common/tbbr/cot_def.h

@ -32,7 +32,12 @@
* buffers must be big enough to hold either. As RSA keys are bigger than ECDSA
* ones for all key sizes we support, they impose the minimum size of these
* buffers.
*
* If the platform employs its own mbedTLS configuration, it is the platform's
* responsibility to define TF_MBEDTLS_USE_RSA or TF_MBEDTLS_USE_ECDSA to
* establish the appropriate PK_DER_LEN size.
*/
#ifdef MBEDTLS_CONFIG_FILE
#if TF_MBEDTLS_USE_RSA
#if TF_MBEDTLS_KEY_SIZE == 1024
#define PK_DER_LEN 162
@ -66,5 +71,6 @@
#else
#error "Invalid value for TF_MBEDTLS_HASH_ALG_ID"
#endif
#endif /* MBEDTLS_CONFIG_FILE */
#endif /* COT_DEF_H */

Loading…
Cancel
Save