org.ietf.jgss
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public ChannelBinding(InetAddress initAddr, InetAddress acceptAddr, byte[] appData)
null
values can be used for any fields which the
application does not want to specify.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.public ChannelBinding(byte[] appData)
appData
- Application supplied data to be used as part of the
channel bindings.public InetAddress getInitiatorAddress()
null
is returned if the address has not been set.null
.public InetAddress getAcceptorAddress()
null
is returned if the address has not been set.null
.public byte[] getApplicationData()
null
is returned if no application data has been
specified for the channel binding.null
.public boolean equals(Object obj)
true
if two channel bindings match.equals
in class Object
obj
- Another channel binding to compare with.Object.hashCode()
public int hashCode()
hashCode
in class Object
Object.equals(Object)
,
System.identityHashCode(Object)