Replies: 4 comments 4 replies
-
There's a script to get the fingerprint here: https://github.com/bertmelis/espMqttClient/blob/main/scripts/get-fingerprint.py The API depends on the underlying |
Beta Was this translation helpful? Give feedback.
-
I tested ESP8266 tls with Arduino on Mac but it failed, so I am not using TLS for ESP8266 yet. |
Beta Was this translation helpful? Give feedback.
-
Unless you give us some more info we cannot help. "It doesn't work" is not enough. |
Beta Was this translation helpful? Give feedback.
-
@dzungpv you can use certificates in ESP8266. This is ho I'm doing it: #if defined(ESP8266)
mpRootCert = new BearSSL::X509List(ca);
mpClientCert = new BearSSL::X509List(pem);
mpClientKey = new BearSSL::PrivateKey(key);
mMqttClient.setTrustAnchors(mpRootCert);
mMqttClient.setClientRSACert(mpClientCert, mpClientKey);
mMqttClient.setBuffers(2048, 2048);
#endif .setBuffers is my addition (and would be in my PR after testing) to @bertmelis code to allow to set tx and rx SSL buffer size in BearSSL to lower the memory consumption. |
Beta Was this translation helpful? Give feedback.
-
I am testing TLS for ESP32 and ESP8266, but how can get ESP8266 fingerprint? Because ESP32 use root ca cert and I have successful running it. Why no include function to convert fingerprint from root ca cert so both platform using the same API?
Update: seem ESP8266 not support tls, in the example you are using 1883 port https://github.com/bertmelis/espMqttClient/blob/246e56df06e39fbf9f246ff0591d8111fc29b644/examples/tls-esp8266/tls-esp8266.ino#L10C9-L10C18
Beta Was this translation helpful? Give feedback.
All reactions