Skip to content
Merged
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
3 changes: 2 additions & 1 deletion features/device_key/TESTS/device_key/functionality/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include "DeviceKey.h"
#include "mbedtls/config.h"
#include "utest/utest.h"
#include "mbed_error.h"
#include "unity/unity.h"
Expand Down Expand Up @@ -51,7 +52,7 @@ void generate_derived_key_consistency_32_byte_key_long_consistency_test(char *ke
*/
int inject_dummy_rot_key()
{
#if !DEVICE_TRNG
#if !DEVICE_TRNG && !defined(MBEDTLS_ENTROPY_HARDWARE_ALT)
uint32_t key[DEVICE_KEY_16BYTE / sizeof(uint32_t)];

memcpy(key, "1234567812345678", DEVICE_KEY_16BYTE);
Expand Down
2 changes: 1 addition & 1 deletion features/device_key/source/DeviceKey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ int DeviceKey::generate_key_by_random(uint32_t *output, size_t size)
return DEVICEKEY_INVALID_PARAM;
}

#if defined(DEVICE_TRNG) || defined(MBEDTLS_ENTROPY_NV_SEED)
#if defined(DEVICE_TRNG) || defined(MBEDTLS_ENTROPY_NV_SEED) || defined(MBEDTLS_ENTROPY_HARDWARE_ALT)
uint32_t test_buff[DEVICE_KEY_32BYTE / sizeof(int)];
mbedtls_entropy_context *entropy = new mbedtls_entropy_context;
mbedtls_entropy_init(entropy);
Expand Down