[Cryptech-Commits] [sw/libhal] branch master updated: If a hash core can't restore state, use a soft core instead.
git at cryptech.is
git at cryptech.is
Wed May 6 19:10:16 UTC 2020
This is an automated email from the git hooks/post-receive script.
paul at psgd.org pushed a commit to branch master
in repository sw/libhal.
The following commit(s) were added to refs/heads/master by this push:
new aab1cf4 If a hash core can't restore state, use a soft core instead.
aab1cf4 is described below
commit aab1cf4d694b4d4fefa77f02b4c42d7683a2f43f
Author: Paul Selkirk <paul at psgd.org>
AuthorDate: Wed May 6 15:06:57 2020 -0400
If a hash core can't restore state, use a soft core instead.
---
hash.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/hash.c b/hash.c
index 2a63900..a496e87 100644
--- a/hash.c
+++ b/hash.c
@@ -4,8 +4,9 @@
* HAL interface to Cryptech hash cores.
*
* Authors: Joachim Str�mbergson, Paul Selkirk, Rob Austein
- * Copyright (c) 2014-2018, NORDUnet A/S
- * All rights reserved.
+ * Copyright (c) 2014-2018, NORDUnet A/S All rights reserved.
+ * Copyright: 2020, The Commons Conservancy Cryptech Project
+ * SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -384,7 +385,8 @@ static inline hal_error_t check_core(hal_core_t **core,
if (*core != NULL)
return HAL_OK;
- if ((err = hal_core_alloc(descriptor->core_name, core, pomace)) == HAL_OK) {
+ if (descriptor->can_restore_state &&
+ (err = hal_core_alloc(descriptor->core_name, core, pomace)) == HAL_OK) {
*flags |= STATE_FLAG_FREE_CORE;
return HAL_OK;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Commits
mailing list