From e3ab9abaf218fd15c79bce00bbf492bbb4e5aa7c Mon Sep 17 00:00:00 2001
From: Nicolas Toromanoff <nicolas.toromanoff@st.com>
Date: Tue, 17 Nov 2020 10:03:40 +0100
Subject: [PATCH] ttbr: increase PK_DER_LEN size

Public key brainpool ecdsa DER certificate are 92 byte long:
OID for brainpool curve are 1 byte bigger than the one for NIST curve.

Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
Change-Id: Ifad51da3c576d555da9fc519d2df3d9a0e6ed91b
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/184837
Reviewed-by: CITOOLS <smet-aci-reviews@lists.codex.cro.st.com>
Reviewed-by: Lionel DEBIEVE <lionel.debieve@st.com>
Reviewed-by: Yann GAUTIER <yann.gautier@st.com>
Tested-by: Lionel DEBIEVE <lionel.debieve@st.com>
---
 include/common/tbbr/cot_def.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/common/tbbr/cot_def.h b/include/common/tbbr/cot_def.h
index 6ce7f80c1..0d2d9acfe 100644
--- a/include/common/tbbr/cot_def.h
+++ b/include/common/tbbr/cot_def.h
@@ -35,7 +35,7 @@
 #error "Invalid value for TF_MBEDTLS_KEY_SIZE"
 #endif
 #else /* Only using ECDSA keys. */
-#define PK_DER_LEN                      91
+#define PK_DER_LEN                      92
 #endif
 
 #if TF_MBEDTLS_HASH_ALG_ID == TF_MBEDTLS_SHA256
-- 
GitLab