Add "server_cert" parameter to firmware_update command. (#1043)

When updating from the MQTT command from a SSL enabled server this adds an option to provide
the server SSL certificate with the command.

This is useful if connecting to different servers or if the configured certificate has expired
and requires updating to not lose the ability to update via OTA.

The certificate provided will be saved to flash memory for use on subsequent restarts.
This commit is contained in:
h2zero authored and GitHub committed 2021-07-29 16:13:30 -05:00
1 parent a4a85ff14b
commit 2dedabc52f
4 files changed
+65 -10

No files matched your search

+7 -3
View File
@@ -121,9 +121,13 @@ const byte mac[] = {0xDE, 0xED, 0xBA, 0xFE, 0x54, 0x95}; //W5100 ethernet shield
/*-------------DEFINE YOUR MQTT PARAMETERS BELOW----------------*/
//MQTT Parameters definition
#if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
# define parameters_size 30
# define mqtt_topic_max_size 100
# define mqtt_max_packet_size 1024
# define parameters_size 30
# define mqtt_topic_max_size 100
# ifdef MQTT_HTTPS_FW_UPDATE
# define mqtt_max_packet_size 2048
# else
# define mqtt_max_packet_size 1024
# endif
#else
# define parameters_size 15
# define mqtt_topic_max_size 50