summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaurenw-arm <lauren.wehrmeister@arm.com>2023-10-03 15:25:21 -0500
committerlaurenw-arm <lauren.wehrmeister@arm.com>2023-10-13 09:59:25 -0500
commitc1ec23dd60954582a9b5dd49e85b092e9ece0680 (patch)
treece9ab64757b87230eefb987307f126db4ba7e215
parent557f7d806a62a460404f8d1bec84c9400585930b (diff)
feat(tbbr): update PK_DER_LEN for ECDSA P-384 keys
Adding the PK_DER_LEN option for 384 key size when adding ECDSA P384 key support Change-Id: I0f19aebad20d1c552976dc3c22ed396d79614769 Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
-rw-r--r--include/common/tbbr/cot_def.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/common/tbbr/cot_def.h b/include/common/tbbr/cot_def.h
index 822c474d5..1d28772c9 100644
--- a/include/common/tbbr/cot_def.h
+++ b/include/common/tbbr/cot_def.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2023, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -46,7 +46,13 @@
#error "Invalid value for TF_MBEDTLS_KEY_SIZE"
#endif
#else /* Only using ECDSA keys. */
+#if TF_MBEDTLS_KEY_SIZE == 384
+#define PK_DER_LEN 120
+#elif TF_MBEDTLS_KEY_SIZE == 256
#define PK_DER_LEN 92
+#else
+#error "Invalid value for TF_MBEDTLS_KEY_SIZE"
+#endif
#endif
#if TF_MBEDTLS_HASH_ALG_ID == TF_MBEDTLS_SHA256