Interface ModifiedServerKeyAcceptor
-
- All Known Implementing Classes:
DefaultKnownHostsServerKeyVerifier,KnownHostsServerKeyVerifier
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ModifiedServerKeyAcceptor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanacceptModifiedServerKey(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.
-
-
-
Method Detail
-
acceptModifiedServerKey
boolean acceptModifiedServerKey(ClientSession clientSession, java.net.SocketAddress remoteAddress, KnownHostEntry entry, java.security.PublicKey expected, java.security.PublicKey actual) throws java.lang.Exception
Invoked when a matching known host key was found but it does not match the presented one.- Parameters:
clientSession- TheClientSessionremoteAddress- The remote host addressentry- The originalKnownHostEntrywhose key did not matchexpected- The expected serverPublicKeyactual- The presented serverPublicKey- Returns:
trueif accept the server key anyway- Throws:
java.lang.Exception- if cannot process the request - equivalent tofalsereturn value
-
-