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.
|
getSimplifiedLoggerpublic RequiredServerKeyVerifier(java.security.PublicKey requiredKey)
public final java.security.PublicKey getRequiredKey()
public boolean verifyServerKey(ClientSession sshClientSession, java.net.SocketAddress remoteAddress, java.security.PublicKey serverKey)
ServerKeyVerifierverifyServerKey in interface ServerKeyVerifiersshClientSession - the current ClientSessionremoteAddress - the host's SocketAddressserverKey - the presented server PublicKeytrue if the key is accepted for the host