mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-14 07:27:03 +03:00
Bell/cspot catchup - release
This commit is contained in:
@@ -92,6 +92,7 @@ class BellHTTPServer : public CivetHandler {
|
||||
|
||||
private:
|
||||
std::unique_ptr<CivetServer> server;
|
||||
std::vector<std::string> civetWebOptions;
|
||||
int serverPort = 8080;
|
||||
|
||||
Router getRequestsRouter;
|
||||
|
||||
@@ -58,7 +58,7 @@ class HTTPClient {
|
||||
const std::vector<uint8_t>& content, Headers& headers);
|
||||
void get(const std::string& url, Headers headers = {});
|
||||
void post(const std::string& url, Headers headers = {},
|
||||
const std::vector<uint8_t>& body = {});
|
||||
const std::vector<uint8_t>& body = {});
|
||||
|
||||
std::string_view body();
|
||||
std::vector<uint8_t> bytes();
|
||||
@@ -106,12 +106,12 @@ class HTTPClient {
|
||||
}
|
||||
|
||||
static std::unique_ptr<Response> post(const std::string& url,
|
||||
Headers headers = {},
|
||||
const std::vector<uint8_t>& body = {}) {
|
||||
auto response = std::make_unique<Response>();
|
||||
response->connect(url);
|
||||
response->post(url, headers, body);
|
||||
return response;
|
||||
Headers headers = {},
|
||||
const std::vector<uint8_t>& body = {}) {
|
||||
auto response = std::make_unique<Response>();
|
||||
response->connect(url);
|
||||
response->post(url, headers, body);
|
||||
return response;
|
||||
}
|
||||
};
|
||||
} // namespace bell
|
||||
|
||||
@@ -9,19 +9,6 @@
|
||||
|
||||
namespace bell::X509Bundle {
|
||||
|
||||
typedef struct crt_bundle_t {
|
||||
const uint8_t** crts;
|
||||
uint16_t num_certs;
|
||||
size_t x509_crt_bundle_len;
|
||||
} crt_bundle_t;
|
||||
|
||||
static crt_bundle_t s_crt_bundle;
|
||||
static std::vector<uint8_t> bundleBytes;
|
||||
|
||||
static constexpr auto TAG = "X509Bundle";
|
||||
static constexpr auto CRT_HEADER_OFFSET = 4;
|
||||
static constexpr auto BUNDLE_HEADER_OFFSET = 2;
|
||||
|
||||
int crtCheckCertificate(mbedtls_x509_crt* child, const uint8_t* pub_key_buf,
|
||||
size_t pub_key_len);
|
||||
/* This callback is called for every certificate in the chain. If the chain
|
||||
|
||||
Reference in New Issue
Block a user