org.bouncycastle.jsse.BCSSLConnection Maven / Gradle / Ivy
package org.bouncycastle.jsse;
/**
* A BCJSSE-specific interface providing access to extended connection-specific functionality.
*/
public interface BCSSLConnection
{
/**
* Returns the application protocol negotiated for this connection, or an empty {@code String}
* if none was negotiated. See RFC 7301 for
* details.
*
* @return The negotiated application protocol, or an empty {@code String}.
*/
String getApplicationProtocol();
/**
* Request TLS Channel Bindings for this connection. See
* RFC 5929 for details.
*
* @param channelBinding
* An IANA-registered "Channel-binding unique prefix" valid for TLS e.g.
* "tls-unique" or "tls-server-end-point".
* @return A copy of the channel binding data as a {@link byte[]}, or null if the binding is
* unavailable for this connection.
*/
byte[] getChannelBinding(String channelBinding);
/**
* Return a String that uniquely identifies this connection during its lifetime within the current process. It
* can be used e.g. for logging but its contents and format are subject to change and should not be relied upon.
* @return A String identifying this connection.
*/
String getID();
/**
* Returns the SSL session in use by this connection
* @return The {@link BCExtendedSSLSession}.
*/
BCExtendedSSLSession getSession();
}