modules: mbedtls: Provide mbedtls_hardware_poll()
conditionally
This is a follow-up to commit c7327f5f70
.
Wrap implementation of the `mbedtls_hardware_poll()` function in
`#if defined(CONFIG_MBEDTLS_ZEPHYR_ENTROPY)` so that the function
is provided only when that option is activated.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
6a93975dd7
commit
010730aff6
1 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,7 @@ static void init_heap(void)
|
|||
#define init_heap(...)
|
||||
#endif /* CONFIG_MBEDTLS_ENABLE_HEAP && MBEDTLS_MEMORY_BUFFER_ALLOC_C */
|
||||
|
||||
#if defined(CONFIG_MBEDTLS_ZEPHYR_ENTROPY)
|
||||
static const struct device *const entropy_dev =
|
||||
DEVICE_DT_GET_OR_NULL(DT_CHOSEN(zephyr_entropy));
|
||||
|
||||
|
@ -80,6 +81,7 @@ int mbedtls_hardware_poll(void *data, unsigned char *output, size_t len,
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_MBEDTLS_ZEPHYR_ENTROPY */
|
||||
|
||||
static int _mbedtls_init(const struct device *device)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue