From 1d2c13a1630a1a6222411e1c03186cb9b1f576e0 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Thu, 24 May 2018 15:40:41 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/1071410 Reviewed-by: Vincent Palatin --- test/build.mk | 2 +- test/rsa.c | 3 ++- test/test_config.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/build.mk b/test/build.mk index 449c0773a1..dd840f7802 100644 --- a/test/build.mk +++ b/test/build.mk @@ -11,7 +11,7 @@ test-list-y=pingpong timer_calib timer_dos timer_jump mutex utils utils_str test-list-$(BOARD_BDS)+= -test-list-$(BOARD_HAMMER)+=entropy +test-list-$(BOARD_HAMMER)+=entropy rsa3 # Samus has board-specific chipset code, and the tests don't # compile with it. Disable them for now. 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 8542a17e0a..e0dfcf48bb 100644 --- a/test/test_config.h +++ b/test/test_config.h @@ -97,6 +97,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 -- cgit v1.2.1