1

I am doig a simple program in ESP32, I connected my ESP32 whith a broker using mqtt over SSL, but after some time the CAcert(public key certificate) has been expired.

In my code I established the CAcert of this way:

const static char* root_ca PROGMEM = \
"-----BEGIN CERTIFICATE-----\n"\
"MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw\n"\
"TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh\n"\
"cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4\n"\
(.....)
"mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d\n"\
"emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=\n"\
"-----END CERTIFICATE-----\n";

Does Exists some way to request new CACert to server?

1 Answers1

1

No, you need to pick a CA with a cert life longer than the expected age of your device or use a ESP32 firmware that allow OTA code updates.

hardillb
  • 54,545
  • 11
  • 67
  • 105