public class RequiredServerKeyVerifier extends AbstractLoggingBean implements ServerKeyVerifier
Modifier and Type | Field and Description |
---|---|
private java.security.PublicKey |
requiredKey |
log
Constructor and Description |
---|
RequiredServerKeyVerifier(java.security.PublicKey requiredKey) |
Modifier and Type | Method and Description |
---|---|
java.security.PublicKey |
getRequiredKey() |
boolean |
verifyServerKey(ClientSession sshClientSession,
java.net.SocketAddress remoteAddress,
java.security.PublicKey serverKey)
Verify that the server key provided is really the one of the host.
|
public RequiredServerKeyVerifier(java.security.PublicKey requiredKey)
public final java.security.PublicKey getRequiredKey()
public boolean verifyServerKey(ClientSession sshClientSession, java.net.SocketAddress remoteAddress, java.security.PublicKey serverKey)
ServerKeyVerifier
verifyServerKey
in interface ServerKeyVerifier
sshClientSession
- the current ClientSession
remoteAddress
- the host's SocketAddress
serverKey
- the presented server PublicKey
true
if the key is accepted for the host