GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(p2p): TLS certificate pinning, protocol limits, and handshake hardening by liqdmetal · Pull Request #136 · DEROFDN/derohe

Conversation

@liqdmetal

@liqdmetal liqdmetal commented Sep 22, 2026

Copy link
Copy Markdown

Summary

Transport-layer security hardening (the p2p half of a security-hardening branch, split for reviewable size — the wallet/crypto half follows as a separate PR):

  • TLS certificate pinning (new p2p/cert_pin.go): the daemon presents a process-local self-signed certificate (replacing per-connection random certs), and peers exchange the SHA-256 fingerprint of the DER cert in the handshake (CertFingerprint field on the wire, omitempty). Store semantics: pin on first contact, verify on reconnect, persisted in the data directory. A MITM between two pinned endpoints is now detected and disconnected.
  • TLS 1.2 minimum on both client and server TLS configs.
  • Handshake hardening: reject peers that omit a fingerprint in both directions; disconnect on pin mismatch.
  • Protocol limits: INV (4096 blocks/txs, 256 chunks), mini-block (5), CBlock (4) size caps with peer disconnection; treesection request validation; encode-side frame cap (MAX_P2P_FRAME_SIZE).

Review notes

  1. Activation is a flag day for peer compatibility: the fingerprint requirement rejects older peers in both directions. We're happy to soften to skip+log for one release if maintainers prefer a gradual rollout — one-line change in rpc_handshake.go.
  2. The pin store is TOFU keyed by peer_id: wiping the data directory re-pins on next contact (acceptable for a gossip network, but worth an explicit maintainer ack).
  3. The NID comment realignment in wire_structs.go is formatting only (the new field rides the same struct); no semantic change.

Verification

  • Base is current community-dev tip 5c84025d; go build ./... green on pristine base and on this branch
  • go vet ./p2p/ fully clean (the p2p package has no pre-existing findings, so clean means clean)
  • gofmt clean on all 7 changed files; no new module dependencies
  • One conflict against upstream drift (P2P_Shutdown: upstream's close(Exit_Event) uncommenting × our cert-pin persistence) resolved as the union of both — build-verified

Related series: #126 · #128 · #132 · #133 · #134 · #135.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@liqdmetal
feat(p2p): TLS certificate pinning, protocol limits, and handshake ha…
50602a2
…rdening

Transport-layer security hardening, split from a broader security
hardening branch (wallet/crypto half filed separately):

- TLS certificate pinning (new p2p/cert_pin.go): process-local
  self-signed cert (replacing per-connection random certs), SHA-256
  fingerprint of the DER cert exchanged in the handshake
  (CertFingerprint field, omitempty on the wire), pin-on-first-contact /
  verify-on-reconnect store persisted in the data directory. MITM
  between two pinned endpoints is now detected and disconnected.
- TLS 1.2 minimum on both client and server configs.
- Handshake: reject missing/zero fingerprint in both directions and
  disconnect on pin mismatch (see review note: mixed-version flag day).
- INV/Chunk/mini-block/CBlock size limits with peer disconnection
  (DoS), treesection request validation, encode-side frame cap.

Review notes: (1) the fingerprint requirement breaks older peers at
activation (flag day) — maintainers may prefer skip+log for one
release; (2) the pin store is TOFU keyed by peer_id — key wipe
triggers re-pinning; (3) NID comment alignment only, no semantic
change. No new module dependencies; base = current community-dev.
@liqdmetal liqdmetal mentioned this pull request Sep 22, 2026
feat(walletapi): fail-closed crypto paths, file-signature binding, KDF upgrade #137
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@liqdmetal
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.