Topic: Build error /wolfssl/wolfcrypt/random.h:117:6: error: #error No RNG so
Hello everyone,
I am not entirely sure if I should post this here in wolfSSL, in wolfMQTT or in the wolfCrypt forums, so I'm sorry if this is not the correct place.
I have an issue when trying to build wolfmqtt (and wolfssl) from source. I do this to be able to use TLS 1.3 in a project that uses an Actinius Icarus board (ARM® Cortex M33 processor). I'm working on windows 11 and am using VS Code.
The build fails with an error (I adjusted the paths here to be relative to the projects source folder):
In file included from extern/wolfssl/wolfssl/wolfcrypt/asn_public.h:36,
from extern/wolfssl/wolfssl/ssl.h:36,
from extern/wolfssl/wolfssl/internal.h:28,
from extern/wolfssl/src/ssl.c:32:
extern/wolfssl/wolfssl/wolfcrypt/random.h:117:6: error: #error No RNG source defined!
I did the following steps to set up my build in addition to my projects own configurations:
I cloned the repositories in ${project_folder}/extern/wolfssl and ${project_folder}/extern/wolfMQTT
in my ${project_folder}/CMakeLists.txt I added the following line to add the zephyr module to my project:
set(ZEPHYR_EXTRA_MODULES ${CMAKE_SOURCE_DIR}\extern\wolfssl ${CMAKE_SOURCE_DIR}\extern\wolfMQTT)
in my prj.conf file I added:
CONFIG_WOLFSSL=y
CONFIG_WOLFSSL_BUILTIN=y
#CONFIG_WOLFSSL_LIBRARY=y
CONFIG_APP_LINK_WITH_WOLFSSL=y
CONFIG_WOLFMQTT=y
CONFIG_WOLFMQTT_TLS=y
I tried a few things to get some Number Generators from the board's software side, but I'm not entirely sure what is expected from me on the wolfssl side.
I have seen the HAVE_HASHDRBG and CUSTOM_RAND_GENERATE_BLOCK defines in random.h. Do I have to implement a custom function to use the boards provided random functions? Is sha256 some kind of library that I otherwise have to link against? Or is this a build configuration issue?
Any help would be greatly appreciated. Thank you!