fix: replace vulnerable Lightning transport and legacy crypto #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/7-modern-transport"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
LDK connections no longer pull in the vulnerable h2 0.3 / rustls-webpki 0.101 stack. The replacement uses HTTP/2-only Hyper 1 and rustls 0.23, preserving gRPC trailers, the configured certificate trust root, official LDK types, and method/body/time-bound authentication. Unary responses and streamed messages are bounded; malformed, compressed, truncated, or unterminated responses fail. HTTP/2 keep-alive supports long-running event subscriptions.
L402 now uses a bounded first-party V2 codec, RustCrypto HMAC/SHA-256, constant-time signature comparison, and OS randomness. Existing persisted roots are used directly, so previously issued tokens remain valid. A frozen token produced by macaroon 0.3 verifies both serialization and signing compatibility. Fixture certificates use rcgen. The default dependency graph no longer includes OpenSSL, sodiumoxide, or libsodium; optional
cdk-postgresstill inherits native TLS/OpenSSL upstream. CDK continues to handle Cashu transport.deny.toml,just deny, and a CI job enforce advisory, license, and source policy without MPL-2.0. The audit reproduces the original vulnerable graph and passes after the change. Three inherited maintenance notices (instant,paste,nostr-relay-pool) have explicit explanations; no vulnerability advisory is suppressed.Validation: all-feature Clippy; 32 unit tests, 26 integration tests, and five doc tests; eight real PostgreSQL tests; API documentation;
cargo deny check; andnix flake check path:. -L. New cases cover legacy tokens, unsupported caveats, truncation, oversized/compressed frames, fragmented/coalesced messages, ambiguous status, and terminal errors. The real two-node Bitcoin/LDK regtest passes manual capture and offline reconciliation using the replacement transport (and compatible CDK 0.18.1). Independent security patch review found no concrete bypasses or regressions. aarch64 was not checked.Closes #7.
Stacked on #18; this PR contains the dependency and transport commit only.
Review follow-up: use the explicit GitHub URL for the Nix installation action; Forgejo otherwise resolves it against data.forgejo.org and fails before running checks.
5e66a40469bfba5414b0bfba5414b01e9e7230f3