|
3 | 3 | #include "PreferencesKeys.h" |
4 | 4 | #include "Logger.h" |
5 | 5 | #include "RestartReason.h" |
| 6 | +#include "util/CertUtil.h" |
6 | 7 | #include <esp_task_wdt.h> |
7 | 8 | #include "FS.h" |
8 | 9 | #include "SPIFFS.h" |
@@ -5585,14 +5586,14 @@ esp_err_t WebCfgServer::buildMqttSSLConfigHtml(PsychicRequest *request, PsychicR |
5585 | 5586 | file.close(); |
5586 | 5587 | ca[filesize] = '\0'; |
5587 | 5588 |
|
5588 | | - printTextarea(&response, "MQTTCA", "MQTT SSL CA Certificate", "*", 2200, true, true); |
| 5589 | + printTextarea(&response, "MQTTCA", "MQTT SSL CA Certificate", "*", certSize(), true, true); |
5589 | 5590 | found = true; |
5590 | 5591 | } |
5591 | 5592 | } |
5592 | 5593 |
|
5593 | 5594 | if (!found) |
5594 | 5595 | { |
5595 | | - printTextarea(&response, "MQTTCA", "MQTT SSL CA Certificate", "", 2200, true, true); |
| 5596 | + printTextarea(&response, "MQTTCA", "MQTT SSL CA Certificate", "", certSize(), true, true); |
5596 | 5597 | } |
5597 | 5598 | } |
5598 | 5599 | else if (type == 1) |
@@ -5620,14 +5621,14 @@ esp_err_t WebCfgServer::buildMqttSSLConfigHtml(PsychicRequest *request, PsychicR |
5620 | 5621 | file.close(); |
5621 | 5622 | cert[filesize] = '\0'; |
5622 | 5623 |
|
5623 | | - printTextarea(&response, "MQTTCRT", "MQTT SSL Client Certificate", "*", 2200, true, true); |
| 5624 | + printTextarea(&response, "MQTTCRT", "MQTT SSL Client Certificate", "*", certSize(), true, true); |
5624 | 5625 | found = true; |
5625 | 5626 | } |
5626 | 5627 | } |
5627 | 5628 |
|
5628 | 5629 | if (!found) |
5629 | 5630 | { |
5630 | | - printTextarea(&response, "MQTTCRT", "MQTT SSL Client Certificate", "", 2200, true, true); |
| 5631 | + printTextarea(&response, "MQTTCRT", "MQTT SSL Client Certificate", "", certSize(), true, true); |
5631 | 5632 | } |
5632 | 5633 | } |
5633 | 5634 | else |
@@ -5655,14 +5656,14 @@ esp_err_t WebCfgServer::buildMqttSSLConfigHtml(PsychicRequest *request, PsychicR |
5655 | 5656 | file.close(); |
5656 | 5657 | key[filesize] = '\0'; |
5657 | 5658 |
|
5658 | | - printTextarea(&response, "MQTTKEY", "MQTT SSL Client Key", "*", 2200, true, true); |
| 5659 | + printTextarea(&response, "MQTTKEY", "MQTT SSL Client Key", "*", certSize(), true, true); |
5659 | 5660 | found = true; |
5660 | 5661 | } |
5661 | 5662 | } |
5662 | 5663 |
|
5663 | 5664 | if (!found) |
5664 | 5665 | { |
5665 | | - printTextarea(&response, "MQTTKEY", "MQTT SSL Client Key", "", 2200, true, true); |
| 5666 | + printTextarea(&response, "MQTTKEY", "MQTT SSL Client Key", "", certSize(), true, true); |
5666 | 5667 | } |
5667 | 5668 | } |
5668 | 5669 | response.print("</table>"); |
@@ -5744,14 +5745,14 @@ esp_err_t WebCfgServer::buildHttpSSLConfigHtml(PsychicRequest *request, PsychicR |
5744 | 5745 | file.close(); |
5745 | 5746 | key[filesize] = '\0'; |
5746 | 5747 |
|
5747 | | - printTextarea(&response, "HTTPKEY", "HTTP SSL Key", "*", 2200, true, true); |
| 5748 | + printTextarea(&response, "HTTPKEY", "HTTP SSL Key", "*", certSize(), true, true); |
5748 | 5749 | found = true; |
5749 | 5750 | } |
5750 | 5751 | } |
5751 | 5752 |
|
5752 | 5753 | if (!found) |
5753 | 5754 | { |
5754 | | - printTextarea(&response, "HTTPKEY", "HTTP SSL Key", "", 2200, true, true); |
| 5755 | + printTextarea(&response, "HTTPKEY", "HTTP SSL Key", "", certSize(), true, true); |
5755 | 5756 | } |
5756 | 5757 | } |
5757 | 5758 | else |
|
0 commit comments