@FunctionalInterface
public interface ModifiedServerKeyAcceptor
Modifier and Type | Method and Description |
---|---|
boolean |
acceptModifiedServerKey(ClientSession clientSession,
java.net.SocketAddress remoteAddress,
KnownHostEntry entry,
java.security.PublicKey expected,
java.security.PublicKey actual)
Invoked when a matching known host key was found but it does not match the presented one.
|
boolean acceptModifiedServerKey(ClientSession clientSession, java.net.SocketAddress remoteAddress, KnownHostEntry entry, java.security.PublicKey expected, java.security.PublicKey actual) throws java.lang.Exception
clientSession
- The ClientSession
remoteAddress
- The remote host addressentry
- The original KnownHostEntry
whose key did not matchexpected
- The expected server PublicKey
actual
- The presented server PublicKey
true
if accept the server key anywayjava.lang.Exception
- if cannot process the request - equivalent to false
return value