To support TLS its necessary to use another MQTT library. The new lib is a drop-in replacement for the async-mqtt-client.
20 lines
466 B
C++
20 lines
466 B
C++
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
#pragma once
|
|
|
|
#include <ESPAsyncWebServer.h>
|
|
|
|
#define MQTT_JSON_DOC_SIZE 3072
|
|
|
|
class WebApiMqttClass {
|
|
public:
|
|
void init(AsyncWebServer* server);
|
|
void loop();
|
|
|
|
private:
|
|
void onMqttStatus(AsyncWebServerRequest* request);
|
|
void onMqttAdminGet(AsyncWebServerRequest* request);
|
|
void onMqttAdminPost(AsyncWebServerRequest* request);
|
|
String getRootCaCertInfo(char* cert);
|
|
|
|
AsyncWebServer* _server;
|
|
}; |