Remove Secure Connection macro and add the config to wifimanager. (#961)

This adds the ability to specify if the MQTT broker connection is secure via a checkbox on the config page of WiFiManager.
Also added to the WiFiManager config page is a text box to enter the brokers TLS certificate.

In the case of using manual configuration a new macro is created MQTT_SECURE_DEFAULT.
When defined as true a secure connection will be requested and the certificate defined in user_config.h will be used.
This commit is contained in:
h2zero authored and GitHub committed 2021-06-02 21:10:38 -06:00
1 parent cd09476807
commit 31efcb32ee
5 files changed
+131 -107

No files matched your search

+7 -9
View File
@@ -71,8 +71,8 @@ extra_configs =
;default_envs = uno-fastled
;default_envs = atmega-all-test
;default_envs = manual-wifi-test
;default_envs = esp32dev-tls-test
;default_envs = nodemcuv2-tls-test
;default_envs = esp32dev-mqtt-fw-test
;default_envs = nodemcuv2-mqtt-fw-test
;default_envs = nodemcuv2-rs232
;default_envs = sonoff-rfbridge-direct
@@ -105,7 +105,7 @@ bmp180 = BMP180#efac46bd8d
htu21 = SparkFun HTU21D Humidity and Temperature Sensor Breakout@1.1.3
ahtx0 = Adafruit AHTX0
ina226 = https://github.com/jarzebski/Arduino-INA226.git#968a684
a6lib = https://github.com/1technophile/A6lib.git
a6lib = https://github.com/h2zero/A6lib
wifimanager = https://github.com/tzapu/WiFiManager.git#c3ff582
ethernet = Ethernet
esp8266_mdns = esp8266_mdns
@@ -826,29 +826,27 @@ build_flags =
'-DGateway_Name="OpenMQTTGateway_TEST_MANUAL_WIFI"'
board_build.flash_mode = dout
[env:esp32dev-tls-test]
[env:esp32dev-mqtt-fw-test]
platform = ${com.esp32_platform}
board = esp32dev
lib_deps =
${com-esp.lib_deps}
build_flags =
${com-esp.build_flags}
'-DSECURE_CONNECTION'
'-DMQTT_HTTPS_FW_UPDATE'
'-DGateway_Name="OpenMQTTGateway_TEST_TLS"'
'-DGateway_Name="OpenMQTTGateway_TEST_MQTT_FW"'
board_build.flash_mode = dout
[env:nodemcuv2-tls-test]
[env:nodemcuv2-mqtt-fw-test]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
build_flags =
${com-esp.build_flags}
'-DSECURE_CONNECTION'
'-DMQTT_HTTPS_FW_UPDATE'
'-DGateway_Name="OpenMQTTGateway_TEST_TLS"'
'-DGateway_Name="OpenMQTTGateway_TEST_MQTT_FW"'
board_build.flash_mode = dout
[env:rf-wifi-gateway]