feat(spot): TLS for PSK Reporter with manual approval of an untrusted certificate (FR-SPOT-13) - #197
Merged
Merged
Conversation
… certificate (FR-SPOT-13) - k4-spot::mqtt_source: a Connector (plain TCP by default), a structured CertInfo / ConnectError::Untrusted, pending_cert and retry_now. Asking for TLS is never quietly downgraded to plain text. - app/src/tls: rustls with a verifier that checks against the public authorities first; a certificate refused for a reason about the certificate is reported with its SHA-256 fingerprint and the reason, and nothing is sent to the server. An approval is exact (host, port, certificate), a changed certificate is reported as changed, and the handshake signature is still verified, so a public certificate replayed without its key is refused. - k4-config: PskReporterPrefs.tls and TrustedCert (validated on read, capped). - Networks: a TLS switch, an approval prompt and a list of approved certificates. A click approves only the certificate that is on screen. The real mqtt.pskreporter.info:1884 presents a publicly trusted certificate (observed once), so approval is a fallback on the real service. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk
This was referenced Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stacked on #196 (POTA); the diff here is TLS only.
What
Design (mine — please overrule)
Findings
mqtt.pskreporter.info:1884(nothing sent after it) shows its certificate is trusted by the public authorities. Approval is a fallback for a self-hosted broker or a filtering proxy.openssl req -x509marks a self-signed certificate as an authority, so rustls refuses it asCaUsedAsEndEntitybefore looking at the issuer. That is probably the most common real self-signed case; it now has proper wording.rustls,webpki-rootsandsha2were already in the tree (the lock file gains three dependency edges).Verified
fmt, clippy
--all-features, full workspace tests (432, bounded),cargo xtaskOK. Real TLS on loopback with two throwaway certificates whose fingerprints were computed byopenssl. Every new test mutated; survivors that were real gaps are listed in the ledger.Validation parked with DC0SK (not done here)
Not covered
RBN and DX cluster (plain telnet); POTA's HTTPS uses the standard checks with no approval option; the prompt shows reason and fingerprint but not the certificate's subject, issuer or dates; withdrawing an approval applies from the next connection.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk