Class TLSServerEndPointChannelBinding

  extended by iaik.security.ssl.chb.ChannelBinding
      extended by iaik.security.ssl.chb.TLSServerEndPointChannelBinding
All Implemented Interfaces:

public class TLSServerEndPointChannelBinding
extends ChannelBinding

This class implements the tls-server-end-point channel binding according to RFC 5929.

RFC 5929 specifies the tls-server-end-point channel binding as hash value calculated from the encoded server certificate.

An application that is interested to capture the tls-server-end-point channel binding value has to announce its interest by adding a ChannelBindings containing the TLSServerEndPointChannelBinding to the SSLContext object, e.g.:

 ChannelBindings channelBindings = new ChannelBindings();
 channelBindings.addChannelBinding(new TLSServerEndPointChannelBinding());
After having completed the handshake the tls-server-end-point channel binding value can be obtained from the SSLSocket:
 ChannelBindings chBndgs = socket.getChannelBindings();
 if (chBndgs != null) {
   TLSServerEndPointChannelBinding tlsServerEndPoint = (TLSServerEndPointChannelBinding)chBndgs.getChannelBinding(TLSServerEndPointChannelBinding.TYPE);
   if (tlsServerEndPoint != null) {
     System.out.println("tls-server-end-point: " + Util.toString(tlsServerEndPoint.getData()));

See Also:
ChannelBinding, ChannelBindings, ChannelBindingType

Field Summary
static ChannelBindingType TYPE
Constructor Summary
          Default constructor.
TLSServerEndPointChannelBinding(java.security.cert.X509Certificate serverCert, byte[] data)
          Creates a TLSServerEndPointChannelBinding object for the given server certificate and hash of the encoded certificate.
Method Summary
 java.security.cert.X509Certificate getServerCert()
          Gets the server certificate.
Methods inherited from class iaik.security.ssl.chb.ChannelBinding
clone, equals, getChannelBindingType, getData, getName, getType, hashCode, toString, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail


public static final ChannelBindingType TYPE
Constructor Detail


public TLSServerEndPointChannelBinding()
Default constructor.


public TLSServerEndPointChannelBinding(java.security.cert.X509Certificate serverCert,
                                       byte[] data)
Creates a TLSServerEndPointChannelBinding object for the given server certificate and hash of the encoded certificate.

serverCert - the server certificate
data - the hash of the encoded certificate
Method Detail


public java.security.cert.X509Certificate getServerCert()
Gets the server certificate.

the server certificate or null if the server certificate is not available

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

iSaSiLk 6.0, (c) 2002 IAIK, (c) 2003 - 2015 SIC