summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-05-24 15:40:41 +0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-06-29 07:24:28 +0000
commit7a41f59c2e0686a06a28e8ffcf4613535c1e39d6 (patch)
treeef03dff331be64d1c2537cff73d12a98f05faf6b
parentaf92d1412115cf6a118b75b6e98c0322c1d6f0d9 (diff)
downloadchrome-ec-7a41f59c2e0686a06a28e8ffcf4613535c1e39d6.tar.gz
test: Make it possible to run rsa tests on hammer board
BRANCH=poppy BUG=b:35647963 BUG=b:77608104 TEST=make run-rsa run-rsa3 TEST=make BOARD=hammer test-rsa3, test on board Change-Id: Id4bd8d5f550dbc6569d88ced114849b3b6411b2f Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1071410 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> (cherry picked from commit 1d2c13a1630a1a6222411e1c03186cb9b1f576e0) [conflict in test/build.mk as the CLs were cherry-picked in the wrong order] Reviewed-on: https://chromium-review.googlesource.com/1119505 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
-rw-r--r--test/rsa.c3
-rw-r--r--test/test_config.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/test/rsa.c b/test/rsa.c
index 401b502855..aaa4a656e2 100644
--- a/test/rsa.c
+++ b/test/rsa.c
@@ -17,10 +17,11 @@
#include "rsa2048-F4.h"
#endif
+static uint32_t rsa_workbuf[3 * RSANUMBYTES/4];
+
void run_test(void)
{
int good;
- uint32_t rsa_workbuf[3 * RSANUMBYTES/4];
good = rsa_verify(rsa_key, sig, hash, rsa_workbuf);
if (!good) {
diff --git a/test/test_config.h b/test/test_config.h
index f46e61443f..2e5eb62ffd 100644
--- a/test/test_config.h
+++ b/test/test_config.h
@@ -96,6 +96,7 @@
#ifdef TEST_RSA3
#define CONFIG_RSA
+#undef CONFIG_RSA_KEY_SIZE
#define CONFIG_RSA_KEY_SIZE 2048
#define CONFIG_RSA_EXPONENT_3
#define CONFIG_RWSIG_TYPE_RWSIG