SSLClientParameters mTLS not at beginning but at runtime #33
Replies: 3 comments 2 replies
-
HI @simogaspa84 Have a look at the solution in Dynamic Certificates #34. I also wonder why you have to go the hard way, as ESP32 already have all the latest For other boards, adapt the ESP solution to store and use the Root CA Certs, not the individual Certs of every site. You also must implement OTA to update the on-the-field device as the CA certs would expire every several years. I'm afraid I won't have time to help you here. Try to do more research yourself. Good Luck, |
Beta Was this translation helpful? Give feedback.
-
Another suggestion for you, as you're using ESP32 + Ethernet, is to use my brand-new LwIP-based libraries
with these following benefits
The Root CA Certs are already included / updated in the core, and you don't need to use the old way to get individual SSL Certs for each site. So every board can use the same firmware, you don't need to modify for each board. Try first to use WiFi SSL to be familiar with the powerful feature, before using Ethernet. The steps to move to Ethernet, from WiFi, is very simple and easy. Also check these libraries, based on those
and many more for you to test |
Beta Was this translation helpful? Give feedback.
-
It seems that you can use something such as
and user can modify the Credentials on-the-fly |
Beta Was this translation helpful? Give feedback.
-
Hi @khoih-prog ..
I hope you are fine and well.
I have already tried your lib and it is working well but i have the need to call this istruction..
SSLClientParameters mTLS = SSLClientParameters::fromPEM(my_cert, sizeof my_cert, my_key, sizeof my_key);
not at the beginning of the module but at runtime inside another function.
I explain you why i need to do this it is because i want to read from a txt file the certificates and keys for the connection instead of change the code manually for every device that is deployed.
But when i try to do this
my esp32 is crashing and restarting..
I wonder if in your opinion it is possible to call that instruction once i have read the txt file..
Thanks a lot for your help
Beta Was this translation helpful? Give feedback.
All reactions