Skip to content

Support host certificates in client - #752

Merged
Eugeny merged 5 commits into
mainfrom
feat/host-certificates
Aug 17, 2026
Merged

Support host certificates in client#752
Eugeny merged 5 commits into
mainfrom
feat/host-certificates

Conversation

@Eugeny

@Eugeny Eugeny commented Aug 17, 2026

Copy link
Copy Markdown
Owner

#748 + fixes

biao29 and others added 5 commits August 14, 2026 05:04
Five coupled pieces. The exchange hash now uses the blob the server actually
sent: for a certificate the parsed form is only the key inside it, and
re-encoding that hashes something the server never sent — a failure that looks
like a bad signature and is computed entirely locally, so there is nothing on
the wire to compare against.

The key exchange is verified with the key the certificate contains; the
certificate's own signature is a separate proof, left to the client and its
trusted authorities. Collapsing them would accept a certificate nobody vouched
for.

check_server_certificate replaces check_server_key rather than adding to it —
the key inside a certificate is not something a client was ever told to trust,
and asking about it as well invites answering the wrong question. It defaults
to refusing: a client that has not been taught which authorities it trusts
cannot answer, and answering wrongly accepts any machine whose operator can get
a certificate from anyone at all.

Certificate algorithms are a parallel list because Algorithm cannot represent
one — it maps ssh-ed25519-cert-v01@openssh.com back to Ed25519, so a
certificate placed in `key` would be advertised under the plain name. Empty by
default: advertising it makes servers present certificates to clients that may
have no idea who is allowed to have signed them.
Two literals build it field-by-field, so a new field is a breaking change for
them. Noted in the pull request: downstream code that does the same needs the
one-line addition, which is why the field carries an empty default and nothing
else changes.
@oni303

oni303 commented Aug 17, 2026

Copy link
Copy Markdown

Would this also add support for servers to authenticate users that provide a signed certificate.
Please have a look at #641 we worked and tested quite a bit

@Eugeny

Eugeny commented Aug 17, 2026

Copy link
Copy Markdown
Owner Author

@oni303 no worries - I've seen all 3 PRs - I'll merge client support here since and then merge your server support on top with a few changes

@Eugeny Eugeny changed the title Feat/host certificates Support host certificates in client Aug 17, 2026
@Eugeny
Eugeny merged commit 09f6582 into main Aug 17, 2026
10 of 11 checks passed
@Eugeny
Eugeny deleted the feat/host-certificates branch August 17, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants