Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-8674: Fix ServerKeyVerifier impl for key type #8675

Merged
merged 1 commit into from Jul 17, 2023

Conversation

artembilan
Copy link
Member

Fixes #8674

The ResourceKnownHostsServerKeyVerifier does not take into account that several different keys can be present in the known hosts resource for the same host/port

  • Fix ResourceKnownHostsServerKeyVerifier to find a list of knows host for the requested session. Then iterate of this result to match the key type first and then compare keys and their revoked marker

Cherry-pick to 6.1.x & 6.0.x

Fixes spring-projects#8674

The `ResourceKnownHostsServerKeyVerifier` does not take into account that several different
keys can be present in the known hosts resource for the same host/port

* Fix `ResourceKnownHostsServerKeyVerifier` to find a list of knows host for the requested session.
Then iterate of this result to match the key type first and then compare keys and their `revoked` marker

**Cherry-pick to `6.1.x` & `6.0.x`**
@garyrussell garyrussell merged commit d4535ca into spring-projects:main Jul 17, 2023
2 checks passed
garyrussell pushed a commit that referenced this pull request Jul 17, 2023
Fixes #8674

The `ResourceKnownHostsServerKeyVerifier` does not take into account that several different
keys can be present in the known hosts resource for the same host/port

* Fix `ResourceKnownHostsServerKeyVerifier` to find a list of knows host for the requested session.
Then iterate of this result to match the key type first and then compare keys and their `revoked` marker

**Cherry-pick to `6.1.x` & `6.0.x`**
garyrussell pushed a commit that referenced this pull request Jul 17, 2023
Fixes #8674

The `ResourceKnownHostsServerKeyVerifier` does not take into account that several different
keys can be present in the known hosts resource for the same host/port

* Fix `ResourceKnownHostsServerKeyVerifier` to find a list of knows host for the requested session.
Then iterate of this result to match the key type first and then compare keys and their `revoked` marker

**Cherry-pick to `6.1.x` & `6.0.x`**
@garyrussell
Copy link
Contributor

...and cherry-picked to 6.1.x as 90dfed5 and 6.0.x as c267bd5

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.

ResourceKnownHostsServerKeyVerifier does not consider the specified keytypes
2 participants