com.sshtools.common.hosts
Class DialogKnownHostsKeyVerification

java.lang.Object
  extended by com.sshtools.j2ssh.transport.AbstractKnownHostsKeyVerification
      extended by com.sshtools.common.hosts.DialogKnownHostsKeyVerification
All Implemented Interfaces:
HostKeyVerification

public class DialogKnownHostsKeyVerification
extends AbstractKnownHostsKeyVerification

Version:
$Revision: 1.13 $
Author:
$author$

Constructor Summary
DialogKnownHostsKeyVerification(java.awt.Component parent)
          Creates a new DialogKnownHostsKeyVerification object.
DialogKnownHostsKeyVerification(java.awt.Component parent, java.lang.String hostFileName)
          Creates a new DialogKnownHostsKeyVerification object.
 
Method Summary
 void onDeniedHost(java.lang.String host)
           
 void onHostKeyMismatch(java.lang.String host, SshPublicKey recorded, SshPublicKey actual)
           Called by the verifyHost method when the host key supplied by the host does not match the current key recording in the known hosts file.
 void onUnknownHost(java.lang.String host, SshPublicKey key)
           Called by the verifyHost method when the host key supplied is not recorded in the known_hosts file.
 void setVerificationEnabled(boolean enabled)
           
 
Methods inherited from class com.sshtools.j2ssh.transport.AbstractKnownHostsKeyVerification
allowedHosts, allowHost, isHostFileWriteable, removeAllowedHost, saveHostFile, toString, verifyHost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DialogKnownHostsKeyVerification

public DialogKnownHostsKeyVerification(java.awt.Component parent)
                                throws InvalidHostFileException
Creates a new DialogKnownHostsKeyVerification object.

Parameters:
parent -
Throws:
InvalidHostFileException

DialogKnownHostsKeyVerification

public DialogKnownHostsKeyVerification(java.awt.Component parent,
                                       java.lang.String hostFileName)
                                throws InvalidHostFileException
Creates a new DialogKnownHostsKeyVerification object.

Parameters:
parent -
hostFileName -
Throws:
InvalidHostFileException
Method Detail

setVerificationEnabled

public void setVerificationEnabled(boolean enabled)
Parameters:
enabled -

onDeniedHost

public void onDeniedHost(java.lang.String host)
                  throws TransportProtocolException
Parameters:
host -
Throws:
TransportProtocolException

onHostKeyMismatch

public void onHostKeyMismatch(java.lang.String host,
                              SshPublicKey recorded,
                              SshPublicKey actual)
                       throws TransportProtocolException
Description copied from class: AbstractKnownHostsKeyVerification

Called by the verifyHost method when the host key supplied by the host does not match the current key recording in the known hosts file.

Specified by:
onHostKeyMismatch in class AbstractKnownHostsKeyVerification
Parameters:
host -
recorded -
actual -
Throws:
TransportProtocolException

onUnknownHost

public void onUnknownHost(java.lang.String host,
                          SshPublicKey key)
                   throws TransportProtocolException
Description copied from class: AbstractKnownHostsKeyVerification

Called by the verifyHost method when the host key supplied is not recorded in the known_hosts file.

Specified by:
onUnknownHost in class AbstractKnownHostsKeyVerification
Parameters:
host -
key -
Throws:
TransportProtocolException


Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.