org.ietf.jgss
Class ChannelBinding
- java.lang.Object
-
- org.ietf.jgss.ChannelBinding
-
public class ChannelBinding extends java.lang.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.
Based on the IETF CAT Internet Draft draft-ietf-cat-gssv2-javabind-05 which is now a Proposed Standard. It encodes channel binding in ASN.1 format
-
-
Constructor Summary
Constructors Constructor and Description ChannelBinding(byte[] appData)
Creates a ChannelBinding object without any addressing information.ChannelBinding(java.net.InetAddress initiatorAddress, java.net.InetAddress acceptorAddress, byte[] appData)
Create a ChannelBinding object with user supplied address information and data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
equals(java.lang.Object obj)
Returns "true" if two channel bindings match.java.net.InetAddress
getAcceptorAddress()
Returns the acceptor's address for this channel binding.byte[]
getApplicationData()
Returns application data being used as part of the ChannelBinding.java.net.InetAddress
getInitiatorAddress()
Returns the initiator's address for this channel binding.int
hashCode()
Returns a hashcode value for this ChannelBinding object.
-
-
-
Constructor Detail
-
ChannelBinding
public ChannelBinding(java.net.InetAddress initiatorAddress, java.net.InetAddress acceptorAddress, 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:
initiatorAddress
- The address of the context initiator. "null" value can be supplied to indicate that the application does not want to set this value.acceptorAddressThe
- 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 java.net.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 if no initiator address has been set.
-
getAcceptorAddress
public java.net.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 if no acceptor has been set.
-
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:
- application data, or null if no application data has been set.
-
equals
public boolean equals(java.lang.Object obj)
Returns "true" if two channel bindings match. (Note that the Java language specification requires that two objects that are equal according to the equals(Object) method must return the same integer result when the hashCode() method is called on them.)- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- Another channel binding to compare with.- Returns:
- true if this ChannelBinding equals the specified object, false otherwise.
-
hashCode
public int hashCode()
Returns a hashcode value for this ChannelBinding object.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- a hashCode value
-
-