aboutsummaryrefslogtreecommitdiff
path: root/tests/test-aes-key-wrap.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2016-07-05 22:45:35 -0400
committerPaul Selkirk <paul@psgd.org>2016-07-05 22:45:35 -0400
commit30f8e4e85b6a337291b09d55d8edc15e422b6341 (patch)
tree19199dd47bb98e18a96281d34e35d1971565fc72 /tests/test-aes-key-wrap.c
parente1c57eff41a57b8a3f16e5d652b5598d75887a21 (diff)
Attempt to add resource management, for multiple cores of the same type.
Find a suitable core, and mark it busy. Don't forget to release it as soon as you're done. This has a knock-on effect of un-const'ing core arguments and struct fields in a lot of places, and it moves some core checks around.
Diffstat (limited to 'tests/test-aes-key-wrap.c')
-rw-r--r--tests/test-aes-key-wrap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-aes-key-wrap.c b/tests/test-aes-key-wrap.c
index 1207acb..5ecd46d 100644
--- a/tests/test-aes-key-wrap.c
+++ b/tests/test-aes-key-wrap.c
@@ -109,7 +109,7 @@ static const char *format_hex(const uint8_t *bin, const size_t len, char *hex, c
return hex;
}
-static int run_test(const hal_core_t *core,
+static int run_test(hal_core_t *core,
const uint8_t * const K, const size_t K_len,
const uint8_t * const C, const size_t C_len)
{
@@ -169,7 +169,7 @@ int main (int argc, char *argv[])
printf("Testing whether AES core reports present...");
- const hal_core_t *core = hal_core_find(AES_CORE_NAME, NULL);
+ hal_core_t *core = hal_core_find(AES_CORE_NAME, NULL);
if (core == NULL) {
printf("no, skipping keywrap tests\n");