Hey Eric,
Thanks! and also thank you for your detailed response.
embhorn wrote:Are you building from the Zephyr folder?
The project structure looks something like this:
Project/
|---extern/
| |---wolfssl/
| |---wolfmqtt/
|---src/
| |---*.c
|--- CMakeLists.txt
|--- prj.conf
|--- KConfigI am not a 100% sure if I understand your question/ the situation correctly, but I am not starting my build there. I am using the NRF Connect extension for vs code to build my application. This software is used for the board that I am developing on.
I am adding wolfSSL as a zephyr module, which to my understanding also results in the cmake add_subdirectory() function to be called on the wolfssl main folder (https://docs.zephyrproject.org/latest/d … ld-system/chiikawa puzzle).
embhorn wrote:This uses the user_settings.h file for configuration.
It seems that in this user_settings.h the WC_NO_HASHDRBG gets defined, because CONFIG_MBEDTLS_PSA_CRYPTO_C is defined in my environment, which could cause the build to run into this case (see: https://github.com/wolfSSL/wolfssl/blob … h#L68-L117):
#elif !defined(WC_NO_RNG) #error No RNG source defined!
For testing purposes I also tried to build the example provided here:
zephyr/samples/wolfssl_test
and here:
zephyr/samples/wolfssl_tls_sock
There the error also shows up.Interestingly this same configuration works, if I build the test application for the nrf52840dk/nrf52840 board, but I am not quite sure how to investigate the differences in the build environment.
I am currently trying to disable mbedtls to see what effects this would have on the build.
EDIT:
So, I got it to build changing only a few lines in the user_config.h you linked. When I comment out the following lines
#ifdef CONFIG_MBEDTLS_PSA_CRYPTO_C #define WOLFSSL_HAVE_PSA #ifndef SINGLE_THREADED #define WOLFSSL_PSA_GLOBAL_LOCK #endif #define WC_NO_HASHDRBG /* use PSA RNG directly via wc_psa_get_random */ #endif
The build works, but I can not judge if this is still a valid configuration. Does not defining WOLFSSL_HAVE_PSA and WC_NO_HASHDRBG have any undesirable effects?
Please post questions or comments you have about wolfSSL products here. It is helpful to be as descriptive as possible when asking your questions.
ReferencesStable Releases - download stable product releases.
Development Branch - latest development branch on GitHub.
wolfSSL Manual - wolfSSL (formerly CyaSSL) product manual and API reference.