Repository navigation
fix(gateway): drop the unused exact-cert map and reject an empty SNI label - #1603
Merged
Merged
Conversation
kvinwang
added a commit
that referenced
this pull request
Nov 18, 2026
CertLock follows #1599-#1601 on wavekv 2.2: the lock value carries a nonce, a lease stamped beyond the drift bound counts as expired, and release and lease-guarded writes are no-ops once the lease expired by the local clock. The force-release, clock-step-back and stale-release counterexamples become positive theorems: ownership on one node under any clock, and a release or guarded commit losing LWW to any successor whose clock is within the drift bound. The replication gap, skew beyond the drift bound, and cross-node force release remain as counterexamples. Sni follows #1602: the returned name lies within every declared block. CertStore follows #1603: no exact-match table, empty first label refused. Signed-off-by: Kevin Wang <wy721@qq.com>
kvinwang
enabled auto-merge
November 18, 2026 08:46
CertStore kept an exact_certs map that nothing ever filled: add_cert, the only way in, stores every certificate as the wildcard for its base domain, and update_cert and the KvStore reloads all go through it. Remove the map and the exact-match branch of resolve_cert. resolve_cert also took ".example.com" as a subdomain of example.com and served the *.example.com certificate for it. rustls already refuses such an SNI as an invalid DNS name before the resolver runs, so this is not reachable today; reject the empty label in the resolver itself rather than relying on that. Signed-off-by: Kevin Wang <wy721@qq.com>
kvinwang
force-pushed
the
fix/gateway-cert-store-exact
branch
from
November 18, 2026 09:52
e21f36e to
6721051
Compare
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.
CertStore::exact_certswas never populated:add_cert, the only way in, stores every certificate as the wildcard for its base domain. Its lookup branch inresolve_certwas dead, so it is removed.resolve_certalso accepted an empty first label (.example.comresolved to theexample.comwildcard); it now returnsNone.Not reachable today, since rustls rejects an SNI with an empty label before the resolver runs; this stops the resolver from relying on that.
Found by the Lean model of the store (#1597,
CertStore.lean).