Skip to content

Commit

Permalink
[#241] Push missed save
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbrown2 committed May 29, 2024
1 parent c85304a commit 090a056
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/core/crypto_tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1593,8 +1593,10 @@ int32_t Crypto_TC_Check_IV_ARSN(SecurityAssociation_t* sa_ptr,TC_t* tc_sdls_proc
{
if (crypto_config.sa_type == SA_TYPE_MARIADB)
{
//if (sa_ptr->ek_ref != NULL)
// free(sa_ptr->ek_ref);
if (sa_ptr->ek_ref[0] != '\0')
clean_ekref(sa_ptr);
if (sa_ptr->ak_ref[0] != '\0')
clean_akref(sa_ptr);
free(sa_ptr);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ static int32_t cryptography_authenticate(uint8_t* data_out, size_t len_data_out,
return CRYPTO_LIB_ERR_NULL_BUFFER;
}

if(sa_ptr->ak_ref == NULL)
if(sa_ptr->ak_ref[0] == '\0')
{
status = CRYPTOGRAHPY_KMC_NULL_AUTHENTICATION_KEY_REFERENCE_IN_SA;
return status;
Expand Down Expand Up @@ -995,7 +995,7 @@ static int32_t cryptography_validate_authentication(uint8_t* data_out, size_t le
Crypto_hexprint(mac,mac_size);
#endif

if(sa_ptr->ak_ref == NULL)
if(sa_ptr->ak_ref[0] == '\0')
{
status = CRYPTOGRAHPY_KMC_NULL_AUTHENTICATION_KEY_REFERENCE_IN_SA;
return status;
Expand Down

0 comments on commit 090a056

Please sign in to comment.