Interface ServerKeyVerifier
- All Known Implementing Classes:
AcceptAllServerKeyVerifier,DefaultKnownHostsServerKeyVerifier,DelegatingServerKeyVerifier,KnownHostsServerKeyVerifier,RejectAllServerKeyVerifier,RequiredServerKeyVerifier,StaticServerKeyVerifier
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The
ServerKeyVerifier is used on the client side to authenticate the key provided by the server.-
Method Summary
Modifier and TypeMethodDescriptionbooleanverifyServerKey(ClientSession clientSession, SocketAddress remoteAddress, PublicKey serverKey) Verify that the server key provided is really the one of the host.
-
Method Details
-
verifyServerKey
boolean verifyServerKey(ClientSession clientSession, SocketAddress remoteAddress, PublicKey serverKey) Verify that the server key provided is really the one of the host.- Parameters:
clientSession- the currentClientSessionremoteAddress- the host'sSocketAddressserverKey- the presented serverPublicKey- Returns:
trueif the key is accepted for the host
-