Interface ChannelBindingProvider
- All Known Implementing Classes:
TlsServerEndPointChannelBindingProvider
public interface ChannelBindingProvider
Provides a mechanism to extract channel binding data of a specific type from an SSL engine.
Implementations of this interface attempt to obtain the channel binding value as defined in relevant RFCs
from a given SSL session, for the requested channel binding type (label). The availability and method of extraction
may depend on the underlying TLS provider, JDK version, or presence of third-party libraries.
-
Method Summary
Modifier and TypeMethodDescriptionOptional<byte[]>getChannelBinding(SSLEngine engine) Attempts to extract the channel binding data from the provided SSL session.getType()Returns the RFC-defined unique prefix for the channel binding type this provider supports (e.g., "tls-exporter", "tls-server-end-point").
-
Method Details
-
getType
String getType()Returns the RFC-defined unique prefix for the channel binding type this provider supports (e.g., "tls-exporter", "tls-server-end-point"). Note that these values are case-sensitive and must match exactly as defined in the respective RFCs.- Returns:
- the channel binding type unique prefix (never null or empty)
-
getChannelBinding
Attempts to extract the channel binding data from the provided SSL session. The returned value, if present, is the channel binding data as specified by the RFC for this provider's type. If the session or provider does not support this operation, an empty Optional is returned. Callers should treat returned arrays as immutable.- Parameters:
engine- the SSL engine from which to extract channel binding data (must not be null)- Returns:
- an Optional containing the channel binding data, or empty if unavailable or unsupported
-