Interface SSLEngineConfigurator
- All Known Implementing Classes:
DefaultSSLEngineConfiguration
public interface SSLEngineConfigurator
The
SSLEngineConfigurator interface is implemented by users of the TLSTM or
DTLSTM transport protocols to configure new TLS (SSL) connections.-
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure the supplied SSLEngine for TLS.default voidconfigure(SSLEngine sslEngine, TransportStateReference tmStateReference) Configure the supplied SSLEngine for TLS on behalf of the given transport state reference, which provides the target of the connection and thus its expected identity and certificate fingerprints.getSSLContext(boolean useClientMode, TransportStateReference transportStateReference) Gets the SSLContext for this SSL connection.
-
Method Details
-
configure
-
configure
Configure the supplied SSLEngine for TLS on behalf of the given transport state reference, which provides the target of the connection and thus its expected identity and certificate fingerprints. The default implementation ignores the transport state reference and callsconfigure(SSLEngine).- Parameters:
sslEngine- aSSLEngineto configure.tmStateReference- the transport state reference of the connection to configure, ornullfor an accepted connection.- Since:
- 3.13.0
-
getSSLContext
SSLContext getSSLContext(boolean useClientMode, TransportStateReference transportStateReference) throws GeneralSecurityException Gets the SSLContext for this SSL connection.- Parameters:
useClientMode-trueif the connection is established in client mode.transportStateReference- the transportStateReference with additional security information for the SSL connection to establish.- Returns:
- the SSLContext.
- Throws:
GeneralSecurityException- if the TLS context initialization failed because of configuration errors.
-