summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Wiklander <jens.wiklander@linaro.org>2022-12-02 15:43:37 +0100
committerJérôme Forissier <jerome@forissier.org>2022-12-06 11:42:12 +0100
commit7596bd335890470f267489b2e8b5210e19deb8b1 (patch)
treec07b9d0a846e733f05e3002fe78ca66753b6c71a
parentcbd8fd17879b1ec28fccc62524f0107ed8774905 (diff)
regression 4016: fix TEE_ATTR_EDDSA_PREHASH parameter
Prior to this patch was the TEE_ATTR_EDDSA_PREHASH attribute initialized incorrectly. To indicate Ed25519ph the a and b values should be 1, 0 respectively. Giving the values 0, 0 is the same as not supplying the TEE_ATTR_EDDSA_PREHASH attribute at all. So fix this by setting the values 1, 0 when supplied. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
-rw-r--r--host/xtest/regression_4000.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/host/xtest/regression_4000.c b/host/xtest/regression_4000.c
index a2163af..ade6753 100644
--- a/host/xtest/regression_4000.c
+++ b/host/xtest/regression_4000.c
@@ -5911,8 +5911,8 @@ static void xtest_tee_test_4016_ed25519(ADBG_Case_t *c)
tv->params.eddsa.public_len);
if (tv->params.eddsa.flag == 1)
- xtest_add_attr(&num_attrs, attrs,
- TEE_ATTR_EDDSA_PREHASH, NULL, 0);
+ xtest_add_attr_value(&num_attrs, attrs,
+ TEE_ATTR_EDDSA_PREHASH, 1, 0);
if (tv->params.eddsa.context_len > 0)
xtest_add_attr(&num_attrs, attrs, TEE_ATTR_EDDSA_CTX,