Support host certificates in client - #752
Merged
Merged
Conversation
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.
|
Would this also add support for servers to authenticate users that provide a signed certificate. |
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 |
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.
#748 + fixes