|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.security.ssl.chb.ChannelBinding
public abstract class ChannelBinding
This class is the basic implementation for TLS ChannelBindings. Every class, which implements a channel binding is derived from this class.
Currently two channel bindings are implemented according to RFC 5929:
An application that is interested to capture some particular channel binding value(s) has to announce its interest byadding
a list of channel bindings to the SSLContext object, e.g.:
ChannelBindings channelBindings = new ChannelBindings(); channelBindings.addChannelBinding(new TLSUniqueChannelBinding()); channelBindings.addChannelBinding(new TLSServerEndPointChannelBinding()); context.setChannelBindings(channelBindings);After having completed the handshake the channel binding values can be
obtained
from the SSLSocket:
ChannelBindings chBndgs = socket.getChannelBindings(); if (chBndgs != null) { TLSUniqueChannelBinding tlsUnique = (TLSUniqueChannelBinding)chBndgs.getChannelBinding(TLSUniqueChannelBinding.TYPE); if (tlsUnique != null) { System.out.println("tls-unique: " + Util.toString(tlsUnique.getData())); } TLSServerEndPointChannelBinding tlsServerEndPoint = (TLSServerEndPointChannelBinding)chBndgs.getChannelBinding(TLSServerEndPointChannelBinding.TYPE); if (tlsServerEndPoint != null) { System.out.println("tls-server-end-point: " + Util.toString(tlsServerEndPoint.getData())); } }
ChannelBindings
,
ChannelBindingType
,
TLSUniqueChannelBinding
,
TLSServerEndPointChannelBinding
Constructor Summary | |
---|---|
ChannelBinding(ChannelBindingType type)
Creates a new ChannelBinding for the given type. |
|
ChannelBinding(ChannelBindingType type,
byte[] data)
Creates a new ChannelBinding for given type and data. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Gets a clone of this ChannelBinding. |
boolean |
equals(java.lang.Object obj)
Checks if this channel binding is equal to the given object. |
ChannelBindingType |
getChannelBindingType()
Gets the type of the channel binding. |
byte[] |
getData()
Gets the data of this channel binding. |
java.lang.String |
getName()
Gets the type name of the channel binding. |
int |
getType()
Gets the type of the channel binding as int. |
int |
hashCode()
Gets a hash code of the channel binding. |
java.lang.String |
toString()
Gets a String representation of the channel binding. |
java.lang.String |
toString(boolean detailed)
Gets a String representation of the channel binding. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ChannelBinding(ChannelBindingType type)
type
- the type of the ChannelBindingpublic ChannelBinding(ChannelBindingType type, byte[] data)
type
- the type of the ChannelBindingdata
- the channel binding data (will not be cloned!)Method Detail |
---|
public ChannelBindingType getChannelBindingType()
public int getType()
public java.lang.String getName()
public byte[] getData()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
true
if this channel binding is equal to the
given object, false
if it is not equal
to itpublic java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean detailed)
detailed
- whether to included the channel binding data in the String output
|
This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |