5 ms·
How do you handle SSL? I found this very cumbersome in my experiments with esp32
by fcsp 5y ago
How do you handle SSL? I found this very cumbersome in my experiments with esp32
- stavros 5y agoIt depends on whether you want to connect to random hosts or ones that you know beforehand. The latter is very easy, I just hardcode the certificate fingerprint. The former/dealing with CAs is harder, I've never done it.
- SavantIdiot 5y agoI never coded on Espressif, but in other SDKs (e.g., mosquitto, mbedtls) typically this is done when you open the connection at the application layer (HTTPS, MQTTS). You pass in the cert bytes either as binary or PEM text as a char[]. Use a CA root cert(s) from your OS/browser. EDIT: grammar and typos.
- konschubert 5y agoThe high-level client in esp-idf handles ssl out of the box and comes with a list of pre-installed root cas. The question, of course, is: What if these CAs expire?