Skip to content

Commit

Permalink
invoke pkcs11_config_interface( ) when initilize the pkcs11 slot if "…
Browse files Browse the repository at this point in the history
…PKCS11_USE_STATIC_CONFIG" is set to 1
  • Loading branch information
benpoon-microchip committed Jun 11, 2021
1 parent b6eb0f3 commit 25b7e9d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/pkcs11/pkcs11_slot.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ CK_RV pkcs11_slot_init(CK_SLOT_ID slotID)
pkcs11_slot_ctx_ptr slot_ctx;
ATCA_STATUS status = CKR_OK;
int retries;

#if PKCS11_USE_STATIC_CONFIG
CK_RV rv;
#endif
if (!lib_ctx)
{
return CKR_CRYPTOKI_NOT_INITIALIZED;
Expand All @@ -173,7 +175,13 @@ CK_RV pkcs11_slot_init(CK_SLOT_ID slotID)
{
return CKR_SLOT_ID_INVALID;
}

#if PKCS11_USE_STATIC_CONFIG
rv = pkcs11_config_interface(slot_ctx);
if (rv != CKR_OK)
{
return CKR_DEVICE_ERROR;
}
#endif
if (!slot_ctx->initialized)
{
ATCAIfaceCfg * ifacecfg = &slot_ctx->interface_config;
Expand Down

0 comments on commit 25b7e9d

Please sign in to comment.