Secure iNet Factory

com.jscape.inet.ssh.util
Class HostKeyFingerprintVerifier

java.lang.Object
  extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.jscape.inet.ssh.util.HostKeyVerifier
HostKeyVerifier.VerificationException
 
Constructor Summary
HostKeyFingerprintVerifier(KeyFingerprintFormatter formatter, SshHostKeys knownKeys)
           
HostKeyFingerprintVerifier(SshHostKeys knownKeys)
          Creates a new verifier instance.
 
Method Summary
 SshHostKeys getKnownKeys()
          Returns allowed host keys.
 java.lang.String toString()
           
 void verify(java.net.InetAddress host, byte[] hostKey)
          Verifies the specified host key.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HostKeyFingerprintVerifier

public HostKeyFingerprintVerifier(KeyFingerprintFormatter formatter,
                                  SshHostKeys knownKeys)

HostKeyFingerprintVerifier

public HostKeyFingerprintVerifier(SshHostKeys knownKeys)
Creates a new verifier instance.

Parameters:
knownKeys - allowed host keys
Method Detail

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 address
hostKey - 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

Secure iNet Factory

Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved