org.ietf.jgss

Class 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 {@link 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(InetAddress initAddr, InetAddress acceptAddr, byte[] appData)
Create a ChannelBinding object with user supplied address information and data.
ChannelBinding(byte[] appData)
Creates a ChannelBinding object without any addressing information.
Method Summary
booleanequals(Object obj)
Returns true if two channel bindings match.
InetAddressgetAcceptorAddress()
Returns the acceptor's address for this channel binding.
byte[]getApplicationData()
Returns application data being used as part of the ChannelBinding.
InetAddressgetInitiatorAddress()
Returns the initiator's address for this channel binding.
inthashCode()
Returns the hash code for this channel binding.

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

equals

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

Parameters: obj Another channel binding to compare with.

Returns: True if this channel binding equals the other.

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.

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.

hashCode

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

Returns: The hash code.