aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2017-09-09 02:08:16 -0400
committerRob Austein <sra@hactrn.net>2017-09-09 02:08:16 -0400
commit68019ff9624747d3505ef60d3dfb3cfc9b5d7720 (patch)
tree2d96de19bc1ce2f87201305c2a804a5e8d2f374f /tests
parentca6432daebfcca16d55c07e588f96202d77109fb (diff)
Whack with club until compiles.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-rsa.c6
-rw-r--r--tests/test-trng.c1
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/test-rsa.c b/tests/test-rsa.c
index 57037c0..9ba9889 100644
--- a/tests/test-rsa.c
+++ b/tests/test-rsa.c
@@ -56,12 +56,12 @@ static int test_modexp(hal_core_t *core,
const rsa_tc_bn_t * const exp, /* Exponent */
const rsa_tc_bn_t * const val) /* Expected result */
{
- uint8_t result[tc->n.len];
+ uint8_t result[tc->n.len], C[tc->n.len], F[tc->n.len];
printf("%s test for %lu-bit RSA key\n", kind, (unsigned long) tc->size);
- if (hal_modexp(core, msg->val, msg->len, exp->val, exp->len,
- tc->n.val, tc->n.len, result, sizeof(result)) != HAL_OK)
+ if (hal_modexp(core, 0, msg->val, msg->len, exp->val, exp->len,
+ tc->n.val, tc->n.len, result, sizeof(result), C, sizeof(C), F, sizeof(F)) != HAL_OK)
return printf("ModExp failed\n"), 0;
if (memcmp(result, val->val, val->len))
diff --git a/tests/test-trng.c b/tests/test-trng.c
index f570752..45dec56 100644
--- a/tests/test-trng.c
+++ b/tests/test-trng.c
@@ -43,6 +43,7 @@
#include <sys/time.h>
#include <hal.h>
+#include <hal_internal.h>
#include <verilog_constants.h>
#ifndef WAIT_FOR_CSPRNG_VALID