upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/components/negentropy_lib/compat
diff options
context:
space:
mode:
authorYour Name <you@example.com>2026-05-19 16:16:54 +0530
committerYour Name <you@example.com>2026-05-19 16:16:54 +0530
commit62bce81d26994bd242035905c94d611cf956bd37 (patch)
treed3818ea8d36cc3d39406b48fa37eae70553faf74 /components/negentropy_lib/compat
parent4af9a0042f2dbe053cacec8427f7f370bd0e0f22 (diff)
fix: ESP-IDF build on master — negentropy_lib component + merge leftoversHEADmaster
- Create components/negentropy_lib/ wrapping negentropy submodule - CMakeLists.txt references submodule sources via relative path - OpenSSL SHA-256 compat using mbedTLS for ESP32 - Enables C++ exceptions + RTTI for negentropy_wrapper.cpp - Remove esp_littlefs, esp_timer from REQUIRES (transitive via wisp_relay) - Keep tcp_transport (direct dep of stratum_client.c via esp_transport.h) - Fix config.c duplicate seed_relays/sync_interval/fallback_interval blocks - Remove leftover merge conflict marker in tollgate_api.c - Add MINER_INTEGRATION_PLAN.md with miner integration checklist idf.py build: PASS (1.3MB, 68% free) make test-unit: PASS (19 suites, 344+ assertions)
Diffstat (limited to 'components/negentropy_lib/compat')
-rw-r--r--components/negentropy_lib/compat/openssl/sha.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/components/negentropy_lib/compat/openssl/sha.h b/components/negentropy_lib/compat/openssl/sha.h
new file mode 100644
index 0000000..b0881c1
--- /dev/null
+++ b/components/negentropy_lib/compat/openssl/sha.h
@@ -0,0 +1,16 @@
1#ifndef OPENSSL_SHA_COMPAT_H
2#define OPENSSL_SHA_COMPAT_H
3
4#include "mbedtls/sha256.h"
5#include <stddef.h>
6
7#define SHA256_DIGEST_LENGTH 32
8
9static inline int SHA256_compat(const unsigned char *d, size_t n, unsigned char *md)
10{
11 return mbedtls_sha256(d, n, md, 0);
12}
13
14#define SHA256 SHA256_compat
15
16#endif