Arduino-esp32: WiFiClientSecure make issue

Created on 5 Dec 2018  Â·  19Comments  Â·  Source: espressif/arduino-esp32

Hardware: (Doesn't matter for this issue !)

Board: node32
Core Installation/update date: latest
IDE name: IDF-with Arduino
Flash Frequency: 40
PSRAM enabled: ?no?
Upload Speed: ?115200?
Computer OS: MacOS

Description:

error in make command !
USING LATEST LIBRARIES without any change !!

CXX build/arduino-esp32/libraries/WiFiClientSecure/src//ssl_client.o /Users/hamid/Documents/Projects/ESP-IDF/IDF-Arduino/components/arduino-esp32/libraries/WiFiClientSecure/src/ssl_client.cpp: In function 'int start_ssl_client(sslclient_context*, const char*, uint32_t, const char*, const char*, const char*, const char*, const char*)': /Users/hamid/Documents/Projects/ESP-IDF/IDF-Arduino/components/arduino-esp32/libraries/WiFiClientSecure/src/ssl_client.cpp:144:67: error: 'mbedtls_ssl_conf_psk' was not declared in this scope (const unsigned char *)pskIdent, strlen(pskIdent)); ^ make[1]: *** [libraries/WiFiClientSecure/src//ssl_client.o] Error 1 make: *** [component-arduino-esp32-build] Error 2

stale

Most helpful comment

This seemed to work for me
make menuconfig

Component Config -> mbedTLS -> TLS Key Exchange Methods -> 
  [*] Enable pre-shared-key ciphersuits
    [*] Enable PSK based ciphersuite modes

Good luck.

All 19 comments

you need to enable MBED_TLS_PSK options in your sdkconfig, please refer to the arduino sdkconfg for an example, there are four or five lines you need to enable.

ok dude, I'm surrender ! :)
I just get a new version (TODAY) and it fixed
I have a simple function to update my esp repos in bash profile. it may help :)

function esp_update() { currentDir=$PWD && \ cd ~/esp && \ cd arduino-esp32 && \ git pull origin master && \ git submodule update --init --recursive && \ cd .. && \ cd esp-idf && \ git pull origin master && \ pip install esptool --upgrade && \ cd $currentDir }

For anyone else that runs into this issue, another solution is to disable the WifiClientSecure component altogether. This can be done by following the steps below:

1) Run make menuconfig from the project's directory
2) Select "Arduino Configuration"
3) Select "Include only specific Arduino libraries"
4) Deselect "Enable AzureIOT", "Enable HttpClient", and "Enable WifiClientSecure" and any other libraries you don't need
5) Exit and save your changes

Thanks henry
But the problem was that the WifiClientSecure was FORCE selected (i think it was gray, not white)

@Goldenstarc Whoops. Forgot to mention that there are other libraries that are dependent on WifiClientSecure, so those have to be disabled first. So the order to disable them in is AzureIOT, HttpClient, WifiClientSecure.
I'll update my original comment to reflect this.

Should this issue be re-opened? Seems to me like the Kconfig file for Arduino should prevent you from using WiFiClientSecure if you don't have its dependencies enabled. I'll see if I can put together a PR to fix this.

Same issue after last update ..

Same issue on latest master

me too

This seemed to work for me
make menuconfig

Component Config -> mbedTLS -> TLS Key Exchange Methods -> 
  [*] Enable pre-shared-key ciphersuits
    [*] Enable PSK based ciphersuite modes

Good luck.

@nevercast it works, thank you.

Should this issue be re-opened? Seems to me like the Kconfig file for Arduino should prevent you from using WiFiClientSecure if you don't have its dependencies enabled. I'll see if I can put together a PR to fix this.

you mean this part of Kconfig.projbuild?

config ARDUINO_SELECTIVE_WiFiClientSecure bool "Enable WiFiClientSecure" depends on ARDUINO_SELECTIVE_COMPILATION select ARDUINO_SELECTIVE_WiFi default y

Yes, a proper kconfig should really have all of an option's dependencies
listed, either with require or select. So that option really should also
select MBEDTLS_PSK_MODES as well as the configuration symbols required for
the PSK modes that have been implemented. Otherwise this codebase is just
going to keep getting broken every time people try to update without
starting from scratch or totally replacing their sdkconfig.

On Sat, Jan 19, 2019, 3:59 AM Hamid <[email protected] wrote:

Should this issue be re-opened? Seems to me like the Kconfig file for
Arduino should prevent you from using WiFiClientSecure if you don't have
its dependencies enabled. I'll see if I can put together a PR to fix this.

you mean this part of Kconfig.projbuild?

config ARDUINO_SELECTIVE_WiFiClientSecure bool "Enable WiFiClientSecure"
depends on ARDUINO_SELECTIVE_COMPILATION select ARDUINO_SELECTIVE_WiFi
default y

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/espressif/arduino-esp32/issues/2154#issuecomment-455766269,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ASf84qtMXKnVfI-32VBTdk0qmW6DuKC1ks5vEuyGgaJpZM4ZCMUZ
.

I think @sfowlr is correct here, the entry that @Goldenstarc highlighted should also depend on TLS PSK.

And as a result, Arduino development team must work on this ?!

Ran into this just now, with a fresh install. Adding the required options in menuconfig as @nevercast stated fixed it.

@Goldenstarc Can you please open this issue so that the Arduino team may review it again.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This stale issue has been automatically closed. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jhowkis picture jhowkis  Â·  3Comments

NickChungVietNam picture NickChungVietNam  Â·  3Comments

maxpromer picture maxpromer  Â·  3Comments

ComputerLag picture ComputerLag  Â·  3Comments

AsafFisher picture AsafFisher  Â·  4Comments