Class TlsServerEndPointChannelBindingProvider
java.lang.Object
org.jivesoftware.util.channelbinding.TlsServerEndPointChannelBindingProvider
- All Implemented Interfaces:
ChannelBindingProvider
public class TlsServerEndPointChannelBindingProvider
extends Object
implements ChannelBindingProvider
Implementation of
ChannelBindingProvider for the tls-server-end-point channel binding type (RFC 5929).
This provider extracts channel binding data from a SSLEngine, using the hash of the server's certificate
as specified by RFC 5929. The hash algorithm is chosen based on the certificate's signature algorithm.
The channel binding data is always derived from the server certificate, regardless of which side computes it.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<byte[]>getChannelBinding(SSLEngine engine) Attempts to extract the channel binding data from the provided SSLEngine.getType()Returns the RFC-defined unique prefix for the channel binding type this provider supports (e.g., "tls-exporter", "tls-server-end-point").
-
Constructor Details
-
TlsServerEndPointChannelBindingProvider
public TlsServerEndPointChannelBindingProvider()
-
-
Method Details
-
getType
Description copied from interface:ChannelBindingProviderReturns 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.- Specified by:
getTypein interfaceChannelBindingProvider- Returns:
- the channel binding type unique prefix (never null or empty)
-
getChannelBinding
Attempts to extract the channel binding data from the provided SSLEngine. This is typically the hash of the server's certificate. The hash algorithm is chosen based on the certificate's signature algorithm per RFC 5929 ยง4.1. The tls-server-end-point binding is always derived from the server certificate, regardless of which side computes it. To determine if the local entity is acting in server or client mode, the engine's #getUseClientMode() method is evaluated.- Specified by:
getChannelBindingin interfaceChannelBindingProvider- Parameters:
engine- the SSLEngine 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
-