diff options
| author | Your Name <you@example.com> | 2026-05-17 05:27:06 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-17 05:27:06 +0530 |
| commit | fdf662f8f1a1a3b38fe4d251982fffab8e9bf664 (patch) | |
| tree | 2413bdc936b757adf4849a522b7df2a5c8eb0aec /tests/unit/Makefile | |
| parent | edd125d0e3fe5fe7c0edf30c429723f3b0120c68 (diff) | |
Phase 7: MCP handler (25 tests), NIP-04 encrypt/decrypt (15 tests), CVM server skeleton
- mcp_handler.c/h: 4 tools (get_config, set_config, get_balance, wallet_send)
- nip04.c/h: AES-256-CBC + ECDH with 0x02 compressed pubkey prefix
- Fixed IV copy bug: mbedTLS AES-CBC modifies IV in-place
- Base64 encode/decode for ciphertext transport
- PKCS7 padding
- cvm_server.c/h: Nostr DM listener with FreeRTOS task
- config: cvm_enabled, cvm_relays fields
- 156 total tests passing across 10 test binaries
Diffstat (limited to 'tests/unit/Makefile')
| -rw-r--r-- | tests/unit/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/unit/Makefile b/tests/unit/Makefile index 53bcc2c..5dee0d7 100644 --- a/tests/unit/Makefile +++ b/tests/unit/Makefile | |||
| @@ -10,6 +10,7 @@ CFLAGS := -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-sign-com | |||
| 10 | -std=gnu17 -g -O0 \ | 10 | -std=gnu17 -g -O0 \ |
| 11 | -DTEST_HOST \ | 11 | -DTEST_HOST \ |
| 12 | -DENABLE_MODULE_SCHNORRSIG=1 -DENABLE_MODULE_EXTRAKEYS=1 \ | 12 | -DENABLE_MODULE_SCHNORRSIG=1 -DENABLE_MODULE_EXTRAKEYS=1 \ |
| 13 | -DENABLE_MODULE_ECDH=1 \ | ||
| 13 | -DECMULT_WINDOW_SIZE=8 -DECMULT_GEN_PREC_BITS=4 \ | 14 | -DECMULT_WINDOW_SIZE=8 -DECMULT_GEN_PREC_BITS=4 \ |
| 14 | -include stubs/esp_err.h \ | 15 | -include stubs/esp_err.h \ |
| 15 | -I stubs \ | 16 | -I stubs \ |
| @@ -21,7 +22,7 @@ LDFLAGS := -lmbedcrypto -lcjson -lm | |||
| 21 | 22 | ||
| 22 | SECP256K1_OBJ := secp256k1.o precomputed_ecmult.o precomputed_ecmult_gen.o | 23 | SECP256K1_OBJ := secp256k1.o precomputed_ecmult.o precomputed_ecmult_gen.o |
| 23 | 24 | ||
| 24 | TESTS := test_geohash test_identity test_nostr_event test_cashu test_session test_tollgate_client test_lnurl_pay test_lightning_payout | 25 | TESTS := test_geohash test_identity test_nostr_event test_cashu test_session test_tollgate_client test_lnurl_pay test_lightning_payout test_mcp_handler test_nip04 |
| 25 | 26 | ||
| 26 | .PHONY: all test clean $(TESTS) | 27 | .PHONY: all test clean $(TESTS) |
| 27 | 28 | ||
| @@ -71,5 +72,11 @@ test_lnurl_pay: test_lnurl_pay.c | |||
| 71 | test_lightning_payout: test_lightning_payout.c | 72 | test_lightning_payout: test_lightning_payout.c |
| 72 | $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) | 73 | $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) |
| 73 | 74 | ||
| 75 | test_mcp_handler: test_mcp_handler.c $(REPO_ROOT)/main/mcp_handler.c | ||
| 76 | $(CC) $(CFLAGS) -I $(REPO_ROOT)/main $< $(REPO_ROOT)/main/mcp_handler.c -o $@ $(LDFLAGS) | ||
| 77 | |||
| 78 | test_nip04: test_nip04.c $(REPO_ROOT)/main/nip04.c $(SECP256K1_OBJ) | ||
| 79 | $(CC) $(CFLAGS) -I $(SECP256K1_PRIV_INC) $< $(REPO_ROOT)/main/nip04.c $(SECP256K1_OBJ) -o $@ $(LDFLAGS) | ||
| 80 | |||
| 74 | clean: | 81 | clean: |
| 75 | rm -f $(TESTS) $(SECP256K1_OBJ) | 82 | rm -f $(TESTS) $(SECP256K1_OBJ) |