-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Configurable TLS timeout for mutual authentication #3944
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
Comments
Just as an FYI, try this as its easier that than certificate/key in a byte array: https://github.com/HarringayMakerSpace/awsiot/blob/master/Esp8266AWSIoTExample/Esp8266AWSIoTExample.ino |
igrr
added a commit
that referenced
this issue
Dec 26, 2017
This timeout value can be customized via a call to setTimeout function. Closes #3944.
@ztittle @torntrousers Created #4027 to fix this, please have a look. |
@igrr the 15 sec default gets it working for me. Thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Arduino/libraries/ESP8266WiFi/src/WiFiClientSecure.cpp
Line 356 in 7df2858
I've been trying to connect to the AWS IOT MQTT endpoint, but it appears that the ESP 8266 chip takes longer than the hard-coded 5-second timeout to perform the TLS handshake. After increasing this value to a generous 30 seconds, I was able to successfully connect to AWS IOT.
For reference, I was using the example code listed on https://github.com/copercini/esp8266-aws_iot/blob/master/examples/MQTT_x509_bin/MQTT_x509_bin.ino, but loading the certs from PROGMEM so I would not run out of memory.
Could the timeout be made configurable through a #DEFINE or an overload on connect()? This would greatly help adoption when integrating to a secure MQTT service such as AWS IoT.
Debug output
The text was updated successfully, but these errors were encountered: