org.ietf.jgss
Class ChannelBinding

java.lang.Object
  extended by org.ietf.jgss.ChannelBinding

public class ChannelBinding
extends Object

The GSS-API accommodates the concept of caller-provided channel binding information. Channel bindings are used to strengthen the quality with which peer entity authentication is provided during context establishment. They enable the GSS-API callers to bind the establishment of the security context to relevant characteristics like addresses or to application specific data.

The caller initiating the security context must determine the appropriate channel binding values to set in the GSSContext object. The acceptor must provide an identical binding in order to validate that received tokens possess correct channel-related characteristics.

Use of channel bindings is optional in GSS-API. Since channel-binding information may be transmitted in context establishment tokens, applications should therefore not use confidential data as channel-binding components.


Constructor Summary
ChannelBinding(byte[] appData)
          Creates a ChannelBinding object without any addressing information.
ChannelBinding(InetAddress initAddr, InetAddress acceptAddr, byte[] appData)
          Create a ChannelBinding object with user supplied address information and data.
 
Method Summary
 boolean equals(Object obj)
          Returns true if two channel bindings match.
 InetAddress getAcceptorAddress()
          Returns the acceptor's address for this channel binding.
 byte[] getApplicationData()
          Returns application data being used as part of the ChannelBinding.
 InetAddress getInitiatorAddress()
          Returns the initiator's address for this channel binding.
 int hashCode()
          Returns the hash code for this channel binding.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelBinding

public ChannelBinding(InetAddress initAddr,
                      InetAddress acceptAddr,
                      byte[] appData)
Create a ChannelBinding object with user supplied address information and data. null values can be used for any fields which the application does not want to specify.

Parameters:
initAddr - The address of the context initiator. null value can be supplied to indicate that the application does not want to set this value.
acceptAddr - The address of the context acceptor. null value can be supplied to indicate that the application does not want to set this value.
appData - Application supplied data to be used as part of the channel bindings. null value can be supplied to indicate that the application does not want to set this value.

ChannelBinding

public ChannelBinding(byte[] appData)
Creates a ChannelBinding object without any addressing information.

Parameters:
appData - Application supplied data to be used as part of the channel bindings.
Method Detail

getInitiatorAddress

public InetAddress getInitiatorAddress()
Returns the initiator's address for this channel binding. null is returned if the address has not been set.

Returns:
The initiator's address, or null.

getAcceptorAddress

public InetAddress getAcceptorAddress()
Returns the acceptor's address for this channel binding. null is returned if the address has not been set.

Returns:
The acceptor's address, or null.

getApplicationData

public byte[] getApplicationData()
Returns application data being used as part of the ChannelBinding. null is returned if no application data has been specified for the channel binding.

Returns:
The application data, or null.

equals

public boolean equals(Object obj)
Returns true if two channel bindings match.

Overrides:
equals in class Object
Parameters:
obj - Another channel binding to compare with.
Returns:
True if this channel binding equals the other.
See Also:
Object.hashCode()

hashCode

public int hashCode()
Returns the hash code for this channel binding.

Overrides:
hashCode in class Object
Returns:
The hash code.
See Also:
Object.equals(Object), System.identityHashCode(Object)