aboutsummaryrefslogtreecommitdiff
path: root/tests/test-pbkdf2.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-pbkdf2.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-pbkdf2.c')
-rw-r--r--tests/test-pbkdf2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-pbkdf2.c b/tests/test-pbkdf2.c
index 6de4b99..f3072a7 100644
--- a/tests/test-pbkdf2.c
+++ b/tests/test-pbkdf2.c
@@ -154,7 +154,7 @@ static void print_hex(const uint8_t * const val, const size_t len)
printf(" %02x", val[i]);
}
-static int _test_pbkdf2(const hal_core_t *core,
+static int _test_pbkdf2(hal_core_t *core,
const uint8_t * const pwd, const size_t pwd_len,
const uint8_t * const salt, const size_t salt_len,
const uint8_t * const dk, const size_t dk_len,
@@ -198,7 +198,7 @@ static int _test_pbkdf2(const hal_core_t *core,
int main (int argc, char *argv[])
{
- const hal_core_t *core = hal_core_find(SHA1_NAME, NULL);
+ hal_core_t *core = hal_core_find(SHA1_NAME, NULL);
int ok = 1;
if (core == NULL)