You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix(quic): implement libp2p-TLS inbound peer-identity verification
PR leanEthereum#964 removed the "fabricate a random peer id" fallback from the QUIC
transport but never implemented the real identity path meant to replace
it, leaving the node unable to form connections:
1. Outbound dials required a /p2p/<peer_id> in the multiaddr but had no
way to verify the dialed identity against the peer certificate.
2. Inbound connections were rejected unconditionally because the
libp2p-certificate verification was "not implemented".
3. The aioquic server never requested the client certificate, so the
server-side peer certificate was always absent.
Add verify_libp2p_certificate as the exact inverse of the certificate
generator: locate the libp2p extension, ASN.1-decode the SignedKey,
enforce the secp256k1 key type, verify the identity signature over the
peer's own TLS public key, and derive the PeerId. Wire it into the
handshake so inbound connections are keyed by the verified identity and
outbound connections assert the verified identity equals the dialed one.
Both paths fail closed: an unverified peer is never registered. Make the
listener request the client certificate so mutual authentication works.
Fix the interop harness to dial /p2p/<peer_id> instead of the bare
listen address.
Add unit tests for the verifier (positive roundtrip plus negative
vectors: tampered signature, missing extension, wrong key type, trailing
bytes, off-curve key, signature over a foreign TLS key) and for the
inbound fail-closed and outbound identity-mismatch paths.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(quic): update vulture whitelist for client-cert request
The server now wraps aioquic's lazy connection initializer to request the
client certificate. aioquic reads the request flag internally, so the
assignment looks unused to vulture; whitelist it.
Drop the now-stale on_connection entry: inbound peer-identity
verification is implemented, so the listener genuinely invokes the
callback and vulture sees the use.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments