Hello gabriel and thank you for your interest in wolfSSL.
It does appear that your local project component directory is correctly structured.
Without seeing your source code, it is difficult to say exactly what the root cause of the problem may be, but I do have some suggestions for you.
I started with the bare-bones Espressif template example here:
https://github.com/wolfSSL/wolfssl/tree … s/template
Using your example of needing`wc_InitRsaKey()`, the `ed25519.h` file needs to be included.
The two most important things to remember:
1) `WOLFSSL_USER_SETTINGS` needs to be defined. See the first line in the `template/main/CMakeLists.txt`:
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_USER_SETTINGS")
2) It is important to include the wolfssl/wolfcrypt/settings.h files before any other wolfSSL includes.
#ifdef WOLFSSL_USER_SETTINGS
#include <wolfssl/wolfcrypt/settings.h>
#ifndef WOLFSSL_ESPIDF
#warning "Problem with wolfSSL user_settings."
#warning "Check components/wolfssl/include"
#endif
#include <wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h>
#else
/* Define WOLFSSL_USER_SETTINGS project wide for settings.h to include */
/* wolfSSL user settings in ./components/wolfssl/include/user_settings.h */
#error "Missing WOLFSSL_USER_SETTINGS in CMakeLists or Makefile:\
CFLAGS +=-DWOLFSSL_USER_SETTINGS"
#endif
#include <wolfssl/wolfcrypt/ed25519.h>
Then I added these two lines to `void app_main(void)` int `main.c`:
ed25519_key key;
wc_ed25519_init(&key);
I was able to confirm the template example would compile.
If you try these steps and the file still cannot be found, please reply with the CMake output, in particular the sections that include the `WOLFSSL_ROOT` keyword. Ensure you are using a recent CMakeLists.txt, such as the one on the example template `components/wolfssl` directory. There should be something like this in the log:
-- Starting FIND_WOLFSSL_DIRECTORY:
-- The WOLFSSL_ROOT environment variable is not set. Searching...
-- WOLFSSL_ROOT found in sdkconfig/KConfig: ~/workspace/wolfssl
-- CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT sdkconfig setting = ~/workspace/wolfssl
-- WOLFSSL_ROOT Variable defined, but source code not found: C:/Users/<user>/workspace/wolfssl
-- CMAKE_CURRENT_SOURCE_DIR = .
After the lines of search, there should be an indication of the wolfSSL directory found:
-- Found wolfssl in CURRENT_SEARCH_DIR = C:/workspace/wolfssl-<user>
-- Found WOLFSSL_ROOT via CMake specification.
You may consider setting an environment variable `WOLFSSL_ROOT` that points your wolfSSL source code directory if your directory structure is such that wolfSSL is not in a parent directory from your project. Moving your project into the wolfSSL directory structure is also an option.
There's additional information and a link to a YouTube video on Getting Started with wolfSSL on the ESP32 here:
https://github.com/wolfSSL/wolfssl/tree … /Espressif
If these tips don't help, it would be great if you could supply a small reproducer app sample so I can further assist you.
Please let me know how it goes. Thank you.
Jim