#pragma once
#include "esp_err.h"
#include <stddef.h>

#ifdef __cplusplus
extern "C" {
#endif

#define TLS_CERT_MAX_SIZE  (10 * 1024)   // até 10 KB de PEM

esp_err_t eeprom_tls_init(void);
esp_err_t eeprom_tls_write_cert(const char *cert_pem);
esp_err_t eeprom_tls_read_cert(char *buffer, size_t buf_size);
esp_err_t eeprom_tls_clear_cert(void);

#ifdef __cplusplus
}
#endif
