espressif / esp-wolfssl

WolfSSL port for ESP-IDF & ESP8266_RTOS_SDK
40 stars 13 forks source link

esp-idf/esp_https_server and wolf-ssl dont work #1

Closed WiktorBAbove closed 4 years ago

WiktorBAbove commented 4 years ago

Hi,

I am trying wolfSSL together with the esp_https_server component in esp-idf(v4.1-dev) . When I try to build https, i get an error that some functions are missing. Possibly there are some parts missing in esp-idf to utilize esp-wolfssl correctly.

Im getting the following error: esp-idf/components/esp_https_server/src/https_server.c: In function 'httpd_ssl_close': esp-idf/components/esp_https_server/src/https_server.c:31:5: error: implicit declaration of function 'esp_tls_server_session_delete'; did you mean 'esp_tls_conn_delete'? [-Werror=implicit-function-declaration]

esp-idf/components/esp_https_server/src/https_server.c: In function 'httpd_ssl_open': esp-idf/components/esp_https_server/src/https_server.c:104:15: error: implicit declaration of function 'esp_tls_server_session_create'; did you mean 'wolfSSL_save_session_cache'? [-Werror=implicit-function-declaration]

in menuconfig im selecting: Choose SSL/TLS library for ESP-TLS (See help for more Info) (wolfSSL (License info in wolfSSL directory README)) ---> and [] Include wolfSSL in esp-tls and [] Enable ESP_HTTPS_SERVER component

BR /W

AdityaHPatwardhan commented 4 years ago

@WiktorBAbove , Thank you for the Issue , I regret to inform you that we have not supported https_server with wolfSSL stack in esp-tls till date, If you want to use https_serever please use mbedtls library, We soon plan on adding the support for https_serever with wolfssl stack.

WiktorBAbove commented 4 years ago

@AdityaHPatwardhan, Could you give an approximate date when this will be available? Also!, will the allocation method be available on the external PSRAM? Thank you!

AdityaHPatwardhan commented 4 years ago

@WiktorBAbove, The you for requesting. I am currently working on adding the https_server , The MR is ready , it will need few days to come on github , Until then please use the patch which contains the required support.
https_server_wolfSSl.zip

WiktorBAbove commented 4 years ago

@AdityaHPatwardhan wow, this actually worked quite well, we are noticing some stability improvements and less usage of internal RAM. Do you think there will be a full replacement of mbedTLS to WolfSSL?(Im thinking all components of esp-idf)

AdityaHPatwardhan commented 4 years ago

@WiktorBAbove Thanks for the heads up, We are trying to reduce mbedTLS dependancy of components as much as possible and make them use esp-tls which can be used with both TLS stacks . but some components heavily use mbedTLS. so we are figuring out something for the way forward but until then I am afraid that mbedtls wont be fully replaced.

WiktorBAbove commented 4 years ago

@AdityaHPatwardhan thanks for info! much appreciated is there like a roadmap of features/bug mailinglist that i can join? Last question; will the patch that you provided me be available in the 4.1 release?

AdityaHPatwardhan commented 4 years ago

@WiktorBAbove I am afraid that we are past the time of feature freeze for esp-idf/release 4.1, server support wont be available in release/4.1, it will surely be available in 4.2. About the other thing there is no mailing list at the moment .But surely you can put feature requests here itself, Thank you.

WiktorBAbove commented 4 years ago

Ok, suppose we can live with being on dev for a while. Any update on when the esp-idf patch will come in on master ?

AdityaHPatwardhan commented 4 years ago

@WiktorBAbove , sorry for the late reply, It will be merged in internal branch this week and should be available in next week on github,

AdityaHPatwardhan commented 4 years ago

@WiktorBAbove support for https_server using wolfSSL has been added into the master branch of esp-idf , it is available on github, you can close the issue , Thank you.

mahavirj commented 4 years ago

Fixed in https://github.com/espressif/esp-idf/commit/d35862b662c473714ee8e7a42e064d92d9c7c851#diff-0af4462738e5d31ff9a995a306b7bb0b