Repository navigation
Fix #771: OpenSSH @cert-authority and @revoked in known_hosts - #2713
Open
pavel-khritonenko wants to merge 5 commits into
Open
pavel-khritonenko wants to merge 5 commits into
pavel-khritonenko wants to merge 5 commits into
Conversation
added 5 commits
October 30, 2026 10:14
pavel-khritonenko
force-pushed
the
fix/771-cert-authority
branch
from
October 30, 2026 07:15
c0bb24a to
dbcd1c7
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.
Fixes #771
Refs #2270
Summary
OpenSSH marker lines in
known_hostswere previously mishandled:@cert-authorityand
@revokedcould be lost on save and were not used when verifying the serverhost key. This change:
@cert-authorityand@revokedlines (including onHostKeys.save()/SSHClient.save_host_keys()).HostKeys.check()to honor revocation, pinned keys, and CA-backedtrust for OpenSSH host certificates (validity window, principals, signature).
SSHClient.connect()viaHostKeys.check().User-facing notes are in
sites/docs/api/hostkeys.rst; changelog entry is underthe unreleased 5.2.0 section in
sites/www/changelog.rst.Test plan
uv run inv test(505 passed, 14 skipped locally)tests/test_hostkeys.py,tests/test_client.py,tests/pkey.py,tests/test_kex.py(KEX tests updated forasbytes_for_kexon
FakeKey)Fixtures live under
tests/_support/host_ca_trust/(test-only host CA + leaf cert).Notes for reviewers
through embedded CA key material, not the PROTOCOL.certkeys wrapper).
PKey.asbytes_for_kex()so certificate material is on the wirewithout changing
asbytes()/ fingerprints used elsewhere.paramiko/ssh_cert.py: RSA (incl. rsa-sha2prefixes), Ed25519, ECDSA; other types fail closed.
test expectations).