com.jscape.inet.ssh.util
Class HostKeyFingerprintVerifier
java.lang.Object
com.jscape.inet.ssh.util.HostKeyFingerprintVerifier
- All Implemented Interfaces:
- HostKeyVerifier
public class HostKeyFingerprintVerifier
- extends java.lang.Object
- implements HostKeyVerifier
Host key verifier implementation based
on the SshHostKeys
usage.
Methods of this class are not thread-safe.
All methods throw NullPointerException
if some object
parameter is null
and IllegalArgumentException
if some parameter doesn't correspond to the method contract.
- Author:
- Alex
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
HostKeyFingerprintVerifier
public HostKeyFingerprintVerifier(KeyFingerprintFormatter formatter,
SshHostKeys knownKeys)
HostKeyFingerprintVerifier
public HostKeyFingerprintVerifier(SshHostKeys knownKeys)
- Creates a new verifier instance.
- Parameters:
knownKeys
- allowed host keys
verify
public void verify(java.net.InetAddress host,
byte[] hostKey)
throws HostKeyVerifier.VerificationException
- Description copied from interface:
HostKeyVerifier
- Verifies the specified host key.
- Specified by:
verify
in interface HostKeyVerifier
- Parameters:
host
- host addresshostKey
- host key data
- Throws:
HostKeyVerifier.VerificationException
- if validation error occurs
getKnownKeys
public SshHostKeys getKnownKeys()
- Returns allowed host keys.
- Returns:
- allowed host keys
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved