mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-06-14 11:56:32 +03:00
add TLS support for all boards
This commit is contained in:
72
lib_standalone/ESP_SSLClient.h
Normal file
72
lib_standalone/ESP_SSLClient.h
Normal file
@@ -0,0 +1,72 @@
|
||||
// standalone stub for ESP_SSLClient (BearSSL) - no-op TLS on host build
|
||||
// Inherits from Stream so it gets print/println via Print, matching the real API.
|
||||
|
||||
#ifndef ESP_SSLClient_h
|
||||
#define ESP_SSLClient_h
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "Stream.h"
|
||||
#include "WiFiClient.h"
|
||||
#include <ClientPosixIPAddress.h>
|
||||
|
||||
class ESP_SSLClient : public Stream {
|
||||
public:
|
||||
ESP_SSLClient() = default;
|
||||
|
||||
void setInsecure() {
|
||||
}
|
||||
void setCACert(const char *) {
|
||||
}
|
||||
void setCertificate(const char *) {
|
||||
}
|
||||
void setPrivateKey(const char *) {
|
||||
}
|
||||
void setBufferSizes(int, int) {
|
||||
}
|
||||
void setSessionTimeout(int) {
|
||||
}
|
||||
void setClient(WiFiClient *) {
|
||||
}
|
||||
void setClient(WiFiClient *, bool) {
|
||||
}
|
||||
|
||||
int connect(IPAddress, uint16_t) {
|
||||
return 0;
|
||||
}
|
||||
int connect(const char *, uint16_t) {
|
||||
return 0;
|
||||
}
|
||||
bool connected() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Stream / Print overrides
|
||||
int available() override {
|
||||
return 0;
|
||||
}
|
||||
int read() override {
|
||||
return -1;
|
||||
}
|
||||
int read(uint8_t *, size_t) {
|
||||
return 0;
|
||||
}
|
||||
int peek() override {
|
||||
return -1;
|
||||
}
|
||||
size_t write(uint8_t) override {
|
||||
return 0;
|
||||
}
|
||||
size_t write(const uint8_t *, size_t) override {
|
||||
return 0;
|
||||
}
|
||||
void flush() override {
|
||||
}
|
||||
|
||||
void stop() {
|
||||
}
|
||||
};
|
||||
|
||||
#endif // ESP_SSLClient_h
|
||||
Reference in New Issue
Block a user