diff options
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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; } |