From 17a50345f06bc60006b40e659b2820d244c71444 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Mon, 17 Apr 2017 14:38:25 -0400 Subject: Remove a redundant 'err' variable in ks_fetch() that was masking error conditions. This manifested as hal_aes_keyunwrap() returning HAL_ERROR_CORE_BUSY, but getting reported as HAL_OK, which led to HAL_ERROR_ASN1_PARSE_FAILED when trying to parse the not-unwrapped der. --- ks_volatile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ks_volatile.c b/ks_volatile.c index 6d65578..d565c60 100644 --- a/ks_volatile.c +++ b/ks_volatile.c @@ -7,7 +7,7 @@ * to survive library exit, eg, for storing PKCS #11 session keys. * * Authors: Rob Austein - * Copyright (c) 2015-2016, NORDUnet A/S All rights reserved. + * Copyright (c) 2015-2017, NORDUnet A/S All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -330,7 +330,6 @@ static hal_error_t ks_fetch(hal_ks_t *ks, uint8_t kek[KEK_LENGTH]; size_t kek_len, der_len_; - hal_error_t err; if (der_len == NULL) der_len = &der_len_; -- cgit v1.2.3