[Cryptech-Commits] [sw/libhal] 01/04: Remove a redundant 'err' variable in ks_fetch() that was masking error conditions.

git at cryptech.is git at cryptech.is
Mon Apr 17 20:37:50 UTC 2017


This is an automated email from the git hooks/post-receive script.

paul at psgd.org pushed a commit to branch ksng
in repository sw/libhal.

commit 17a50345f06bc60006b40e659b2820d244c71444
Author: Paul Selkirk <paul at psgd.org>
AuthorDate: Mon Apr 17 14:38:25 2017 -0400

    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_;



More information about the Commits mailing list