public class ChannelBinding extends Object
启动安全上下文调用者必须确定合适的信道绑定值设置在gsscontext对象。受体必须提供一个相同的绑定,以验证接收到的令牌具有正确的信道相关的特性。
利用信道绑定接口是可选的。channelbinding可以设置为使用setChannelBinding方法GSSContext之前initSecContext或acceptSecContext第一次调用已经完成。除非setChannelBinding方法已用于gsscontext对象设置channelbinding,null channelbinding将假定。
从概念上讲,GSS-API将引发剂和受体的地址信息和应用程序提供的字节数组形式的字符串。该机制计算这个字符串是一个麦克风和绑定到上下文建立令牌的GSSContext接口initSecContext方法发出的MIC。相同的绑定是由其GSSContext对象上下文受体和acceptSecContext MIC的方法是以同样的方式计算处理过程。计算MIC与令牌中发现相比,如果MIC不同,接受将GSSException设置BAD_BINDINGS主要代码,和上下文不成立。某些机制可能包括令牌(而不是一个麦克风)的实际信道绑定数据;应用程序不应该使用保密数据作为信道绑定组件。
单独的机制可能会对可能出现在频道绑定中的地址施加额外的约束。例如,一种机制可以验证信道绑定的引发剂地址字段包含正确的主机系统的网络地址。因此,便携式应用程序应确保它们可以为地址字段提供正确的信息,或忽略寻址信息的设置。
| Constructor and Description |
|---|
ChannelBinding(byte[] appData)
创建一个channelbinding对象没有任何地址信息。
|
ChannelBinding(InetAddress initAddr, InetAddress acceptAddr, byte[] appData)
创建一个channelbinding对象提供的地址信息和用户数据。
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
比较两channelbinding实例。
|
InetAddress |
getAcceptorAddress()
获取此通道绑定的接收器的地址。
|
byte[] |
getApplicationData()
获取此通道绑定的应用程序指定的数据。
|
InetAddress |
getInitiatorAddress()
获取此通道绑定的引发剂的地址。
|
int |
hashCode()
返回该对象的hashCode值channelbinding。
|
public ChannelBinding(InetAddress initAddr, InetAddress acceptAddr, byte[] appData)
null值可以用于任何领域,应用程序不需要指定。
initAddr -背景下引发的地址。
null值可以提供表示该应用程序不想设置此值。
acceptAddr -上下文接受者的地址。
null值可以提供表示该应用程序不想设置此值。
appData -应用程序提供的数据作为信道绑定的一部分。
null值可以提供表示该应用程序不想设置此值。
public ChannelBinding(byte[] appData)
appData -应用程序提供的数据作为信道绑定的一部分。
public InetAddress getInitiatorAddress()
null是如果地址没有设置返回。
public InetAddress getAcceptorAddress()
public byte[] getApplicationData()
null是如果没有数据的应用已经为通道绑定指定的返回。
public boolean equals(Object obj)
equals 方法重写,继承类
Object
obj -另一个channelbinding与这一比较
Object.hashCode(),
HashMap
public int hashCode()
hashCode 方法重写,继承类
Object
Object.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.