Skip to content

Commit

Permalink
ESYS: Fix crypto unit test with mbedtls
Browse files Browse the repository at this point in the history
Context was not initialized with NULL and was not
set to NULL in iesys_crypto_hash_start if the hashAlg
was not implemented. But there was an assert_null.

Signed-off-by: Juergen Repp <[email protected]>
  • Loading branch information
JuergenReppSIT authored and William Roberts committed Nov 8, 2022
1 parent 7883402 commit 3a12e45
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/unit/esys-crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ check_hash_functions(void **state)
assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE);

#ifndef OSSL
context = NULL;
rc = iesys_crypto_hash_start(&crypto_cb, &context, TPM2_ALG_SHA512);
assert_int_equal (rc, TSS2_ESYS_RC_NOT_IMPLEMENTED);
assert_null (context);
Expand Down

0 comments on commit 3a12e45

Please sign in to comment.