3

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?

Defozo
  • 2,946
  • 6
  • 32
  • 51

1 Answers1

1

If you want to use client verification you need those two:

  • setCertificate: this will be your client certificate
  • setPrivateKey: this will be the corresponding key

Here is an website I found useful:

https://nofurtherquestions.wordpress.com/2016/03/14/making-an-esp8266-web-accessible/ - Chapter "Code"

peter
  • 11
  • 1
  • Please add some summary about your link. See [why](https://meta.stackoverflow.com/tags/link-only-answers/info) – Attila Mar 23 '17 at 10:12