Skip to content

Commit

Permalink
Compilation get failed if "PKCS11_USE_STATIC_CONFIG" is set to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
benpoon-microchip committed Jun 11, 2021
1 parent 9e63088 commit 3b1581f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/pkcs11/pkcs11_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,9 @@ CK_RV pkcs11_key_generate

if (CKR_OK == rv && ATCA_SUCCESS != status)
{
#if !PKCS11_USE_STATIC_CONFIG
(void)pkcs11_config_remove_object(pLibCtx, pSession->slot, pKey);
#endif
rv = pkcs11_util_convert_rv(status);
}

Expand Down Expand Up @@ -973,7 +975,9 @@ CK_RV pkcs11_key_generate_pair
rv = pkcs11_util_convert_rv(atcab_genkey(pPrivate->slot, NULL));
if (rv)
{
#if !PKCS11_USE_STATIC_CONFIG
(void)pkcs11_config_remove_object(pLibCtx, pSession->slot, pPrivate);
#endif
}
(void)pkcs11_unlock_context(pLibCtx);
}
Expand Down

0 comments on commit 3b1581f

Please sign in to comment.