org.ssonet.net
Class SSONETNegotiate

java.lang.Object
  |
  +--org.ssonet.net.SSONETNegotiate

public final class SSONETNegotiate
extends java.lang.Object

This class implements the negotiation functions for security goals and mechanisms.


Field Summary
static boolean debug
           
static boolean debugProfiling
           
 
Method Summary
static org.ssonet.mechanisms.PreferenceList computePreferred(org.ssonet.mechanisms.PreferenceList preferences1, org.ssonet.mechanisms.PreferenceList preferences2)
          given two preference lists, this method builds a list of all items, which are on both lists, from the most preferred to the least preferred.
static boolean negotiatePhaseOne(org.ssonet.net.ActionConfiguration ownConfig, org.ssonet.net.ActionConfiguration partnerConfig, org.ssonet.net.SSONETContext context)
          First security goal negotiation.
static org.ssonet.io.IOStream negotiatePhaseThree(org.ssonet.net.PhaseThreeConfiguration ownConfiguration, org.ssonet.net.PhaseThreeConfiguration partnerConfiguration, org.ssonet.io.IOStream ioStream, org.ssonet.io.IOStream basicIOStream, org.ssonet.net.SSONETContext context, boolean isServer)
          Negotiates the mechanisms for the security goals to be enforced.
static org.ssonet.net.PhaseTwoResult negotiatePhaseTwo(org.ssonet.net.ActionConfiguration ownConfig, org.ssonet.net.ActionConfiguration partnerConfig)
          Second security goal negotiation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug

debugProfiling

public static boolean debugProfiling
Method Detail

negotiatePhaseOne

public static boolean negotiatePhaseOne(org.ssonet.net.ActionConfiguration ownConfig,
                                        org.ssonet.net.ActionConfiguration partnerConfig,
                                        org.ssonet.net.SSONETContext context)
First security goal negotiation. The negotiation result is saved in the users security goal configuration.

Parameters:
ownConfig - the users security goal configuration
partnerConfig - the partners security goal configuration
Returns:
true, if a second security goal negotiation is needed, false otherwise

negotiatePhaseTwo

public static org.ssonet.net.PhaseTwoResult negotiatePhaseTwo(org.ssonet.net.ActionConfiguration ownConfig,
                                                              org.ssonet.net.ActionConfiguration partnerConfig)
Second security goal negotiation. This method is only called, if the first negotiation step lead to a conflict, but the parties were willing rethink their setting.

Parameters:
ownConfig - the users security goal configuration for second negotiation
partnerConfig - the partners security goal configuration for second negotiation
Returns:
the result of the security goal negotiation

negotiatePhaseThree

public static org.ssonet.io.IOStream negotiatePhaseThree(org.ssonet.net.PhaseThreeConfiguration ownConfiguration,
                                                         org.ssonet.net.PhaseThreeConfiguration partnerConfiguration,
                                                         org.ssonet.io.IOStream ioStream,
                                                         org.ssonet.io.IOStream basicIOStream,
                                                         org.ssonet.net.SSONETContext context,
                                                         boolean isServer)
                                                  throws SSONETCertificateNotValidException,
                                                         NoCommonMechanismException,
                                                         java.io.IOException
Negotiates the mechanisms for the security goals to be enforced. When a mechanism is found, keys are exchanged and the mechanism is getting initialized immediately.

Parameters:
ownConfiguration - the users configuration for mechanism negotiation
partnerConfiguration - the partners configuration for mechanism negotiation
ioStream - the stream used for negotiation and key exchange
basicIOStream - the data transmission stream of the connection, where the mechanisms shall be applied to.
context - the SSONETContext holding all configuration data for the connection
isServer - true on servers side, false on clients side
Returns:
an IOStream, with the negotiated security mechanisms applied to it.
Throws:
SSONETCertificateNotValidException - if a certificate used is key exchange procedures is not valid
NoCommonMechanismException - if for a security goal no common Mechanism is found
java.io.IOException - if something other went wrong, so that the connection must be aborted.

computePreferred

public static org.ssonet.mechanisms.PreferenceList computePreferred(org.ssonet.mechanisms.PreferenceList preferences1,
                                                                    org.ssonet.mechanisms.PreferenceList preferences2)
given two preference lists, this method builds a list of all items, which are on both lists, from the most preferred to the least preferred.

Parameters:
preferences1 - the first preference list,
preferences2 - the second preference list.


Copyright © 2003 DRIM Team. All Rights Reserved.