org.openuat.apps
Class IPSecConnectorAdmin

java.lang.Object
  extended by org.openuat.apps.IPSecConnectorCommon
      extended by org.openuat.apps.IPSecConnectorAdmin
All Implemented Interfaces:
AuthenticationProgressHandler

public class IPSecConnectorAdmin
extends IPSecConnectorCommon


Field Summary
protected static org.apache.log4j.Logger logger
          Our log4j logger.
 
Fields inherited from class org.openuat.apps.IPSecConnectorCommon
adminEnd, authp, BLOCKNAME_CERTIFICATE, BLOCKNAME_CONFIG, manager
 
Constructor Summary
IPSecConnectorAdmin(uk.ac.lancs.relate.core.Configuration relateConf, java.lang.String caFile, java.lang.String caPassword, java.lang.String caAlias, java.lang.String configFilename, uk.ac.lancs.relate.core.MeasurementManager mm)
           
 
Method Summary
 void AuthenticationFailure(java.lang.Object sender, java.lang.Object remote, java.lang.Exception e, java.lang.String msg)
          This is an implementation of the AuthenticationProgressHandler interface.
 void AuthenticationProgress(java.lang.Object sender, java.lang.Object remote, int cur, int max, java.lang.String msg)
          This is an implementation of the AuthenticationProgressHandler interface.
 boolean AuthenticationStarted(java.lang.Object sender, java.lang.Object remote)
          This event is raised when the authentication protocol is started, to indicate that further events might follow.
 void AuthenticationSuccess(java.lang.Object sender, java.lang.Object remote, java.lang.Object result)
          Upon successful authentication, the established shared key can be used with the remote host.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger
Our log4j logger.

Constructor Detail

IPSecConnectorAdmin

public IPSecConnectorAdmin(uk.ac.lancs.relate.core.Configuration relateConf,
                           java.lang.String caFile,
                           java.lang.String caPassword,
                           java.lang.String caAlias,
                           java.lang.String configFilename,
                           uk.ac.lancs.relate.core.MeasurementManager mm)
                    throws java.io.IOException
Throws:
java.io.IOException
Method Detail

AuthenticationProgress

public void AuthenticationProgress(java.lang.Object sender,
                                   java.lang.Object remote,
                                   int cur,
                                   int max,
                                   java.lang.String msg)
Description copied from class: IPSecConnectorCommon
This is an implementation of the AuthenticationProgressHandler interface.

Specified by:
AuthenticationProgress in interface AuthenticationProgressHandler
Overrides:
AuthenticationProgress in class IPSecConnectorCommon
Parameters:
sender - The object which sent this event.
remote - The remote end with which the authentication is performed.
cur - The current stage in the authentication.
max - The maximum number of stages.
msg - If not null, a message describing the last successful stage.

AuthenticationStarted

public boolean AuthenticationStarted(java.lang.Object sender,
                                     java.lang.Object remote)
Description copied from interface: AuthenticationProgressHandler
This event is raised when the authentication protocol is started, to indicate that further events might follow.

Parameters:
sender - The object which sent this event.
remote - The remote end with which the authentication is performed. Depends on the sender of the event.
Returns:
true if the handler accepts this authentication to be started, false to "veto" it. If any of the registered handlers (which are called in the order in which they were registered) returns false, the (incoming or outgoing) authentication is aborted.

AuthenticationSuccess

public void AuthenticationSuccess(java.lang.Object sender,
                                  java.lang.Object remote,
                                  java.lang.Object result)
Description copied from interface: AuthenticationProgressHandler
Upon successful authentication, the established shared key can be used with the remote host. The type of the remoteHost object depends on the sender of the event, e.g. an InetAddress object for HostProtocolHandler generated events, but an Integer for DongleProtocolHandler generated events (encapsulating the remote relate id).

Parameters:
sender - The object which sent this event.
remote - The remote end with which the authentication is performed. Depends on the sender of the event.
result - The result, if any, of the successful authentication. This can e.g. be a shared key or a set of keys or can even be null if the authentication event is enough to signal successful authentication.

AuthenticationFailure

public void AuthenticationFailure(java.lang.Object sender,
                                  java.lang.Object remote,
                                  java.lang.Exception e,
                                  java.lang.String msg)
Description copied from class: IPSecConnectorCommon
This is an implementation of the AuthenticationProgressHandler interface.

Specified by:
AuthenticationFailure in interface AuthenticationProgressHandler
Overrides:
AuthenticationFailure in class IPSecConnectorCommon
Parameters:
sender - The object which sent this event.
e - Reason for the failue, can be null.
msg - Reaseon for the failue, can be null

main

public static void main(java.lang.String[] args)
                 throws uk.ac.lancs.relate.core.DeviceException,
                        java.io.IOException
Throws:
uk.ac.lancs.relate.core.DeviceException
java.io.IOException


2005-2009, Rene Mayrhofer.