Skip to content

WiFiClientSecure make issue #2154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Hamid-Najafi opened this issue Dec 5, 2018 · 19 comments
Closed

WiFiClientSecure make issue #2154

Hamid-Najafi opened this issue Dec 5, 2018 · 19 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@Hamid-Najafi
Copy link

Hamid-Najafi commented Dec 5, 2018

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

@atanisoft
Copy link
Collaborator

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.

@Hamid-Najafi
Copy link
Author

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 }

@henryjw
Copy link

henryjw commented Jan 13, 2019

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

@Hamid-Najafi
Copy link
Author

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

@henryjw
Copy link

henryjw commented Jan 14, 2019

@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.

@sfowlr
Copy link

sfowlr commented Jan 14, 2019

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.

@qt1
Copy link
Contributor

qt1 commented Jan 16, 2019

Same issue after last update ..

@tevino
Copy link

tevino commented Jan 16, 2019

Same issue on latest master

@hmic
Copy link

hmic commented Jan 17, 2019

me too

@nevercast
Copy link

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.

@tevino
Copy link

tevino commented Jan 18, 2019

@nevercast it works, thank you.

@Hamid-Najafi
Copy link
Author

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

@sfowlr
Copy link

sfowlr commented Jan 21, 2019 via email

@nevercast
Copy link

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

@Hamid-Najafi
Copy link
Author

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

@tmeysson
Copy link

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

@nevercast
Copy link

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

@Hamid-Najafi Hamid-Najafi reopened this Jan 30, 2019
@stale
Copy link

stale bot commented Aug 1, 2019

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.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Aug 1, 2019
@stale
Copy link

stale bot commented Aug 15, 2019

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

@stale stale bot closed this as completed Aug 15, 2019
Boldie pushed a commit to Boldie/arduino-esp32 that referenced this issue Oct 15, 2019
Especially if the user wants to use the library as component in IDF,
there are some pitfalls while doing make menuconfig. One is this missing
dependency which will now fail with a better error message with a hint to
the user how to fix it.

refs espressif#2154 espressif#3215
me-no-dev pushed a commit that referenced this issue Oct 17, 2019
#3364)

Especially if the user wants to use the library as component in IDF,
there are some pitfalls while doing make menuconfig. One is this missing
dependency which will now fail with a better error message with a hint to
the user how to fix it.

refs #2154 #3215
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

9 participants