Skip to content

Fix Greentea test failed with device_key and CRC #7066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions drivers/MbedCRC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ MbedCRC<POLY_16BIT_CCITT, 16>::MbedCRC(uint32_t initial_xor, uint32_t final_xor,
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
_crc_table((uint32_t *)Table_CRC_16bit_CCITT)
{
mbed_crc_ctor();
}

template<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ void generate_derived_key_wrong_key_type_test()
ret = inject_dummy_rot_key();
TEST_ASSERT_EQUAL_INT(DEVICEKEY_SUCCESS, ret);

memset(output, 0, DEVICE_KEY_32BYTE);
memset(output, 0, DEVICE_KEY_16BYTE);
ret = devkey.generate_derived_key(salt, salt_size, output, 12);//96 bit key type is not supported
TEST_ASSERT_EQUAL_INT32(DEVICEKEY_INVALID_KEY_TYPE, ret);

Expand Down