WiFiClientSecure
of Arduino library for ESP8266 has methods: setCACert
, setCertificate
, setPrivateKey
.
I need some explanation what is what and for what purpose.
When I'm creating a certificate for my server with Let's Encrypt I get cert.pem
, chain.pem
, fullchain.pem
, privkey.pem
.
Which files should be used for WiFiClientSecure
?
Should I generate another private key(s?) for my ESPs which are working as clients?
@Edit
Ok, so what I learnt so far is that the private key is different for every ESP8266. But I still don't know how to handle it. How to generate those private keys? How to handle them from the server's side?