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

Abstract revoked key handling in KnownHostsServerKeyVerifier #653

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

joeljohansson99
Copy link

Abstract handling of revoked key so extending classes has an easier way to add functionality when a matching host entry has a 'revoked' marker.

@tomaswolf
Copy link
Member

The formatter is not happy. Run a local maven build; it'll reformat the file. Then commit (amend) the result and force push.

@joeljohansson99
Copy link
Author

Hi Thomas, thanks for the feedback. I ran the formatting, and committed. I did not get the amend to work, hope that is alright.

* @param serverKey The presented server {@link PublicKey}
*/
protected void handleRevokedKey(ClientSession clientSession, SocketAddress remoteAddress, PublicKey serverKey) {
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now PMD is unhappy about this empty block.

Either insert a comment // By default do nothing, or move the debug logging from before the call into this body. The latter might make sense; if someone overrides this, he can then decide whether to have that debug logging (call super) or not (don't call super, do something else entirely).

@joeljohansson99
Copy link
Author

I moved the debug logging. Think it makes sense too. Thanks

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.

2 participants