diff options
author | Paul Selkirk <paul@psgd.org> | 2016-07-06 18:18:28 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2016-07-06 18:18:28 -0400 |
commit | 7923c24511b1f176dfb69f199fba6fccb4954c0b (patch) | |
tree | 9a50bfa82945fef7f409d7d07b23b722f47a8be0 | |
parent | f74b88612d128460cf32a281bc9464b24666cee8 (diff) |
Use the second sha256 core, if available, for pbkdf2.
This is a hopefully temporary stopgap, in lieu of proper resource
management and/or sharing of cores between threads.
-rw-r--r-- | pbkdf2.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -105,6 +105,15 @@ hal_error_t hal_pbkdf2(const hal_core_t *core, if ((uint64_t) derived_key_length > ((uint64_t) 0xFFFFFFFF) * descriptor->block_length) return HAL_ERROR_UNSUPPORTED_KEY; +#if 1 + /* HACK - find the second sha256 core, to avoid interfering with rpc. + * If there isn't a second one, this will set core to NULL, and + * hal_hash_initialize will find the first one. + */ + core = hal_core_find(descriptor->core_name, NULL); + core = hal_core_find(descriptor->core_name, core); +#endif + memset(result, 0, sizeof(result)); memset(mac, 0, sizeof(mac)); |