- All Known Implementing Classes:
DefaultSslContextFactory,QuicSslContextFactory
public interface SslContextFactory
A factory for a Netty
SslContext, the factory is configured with the fluent setters until create()
to obtain a properly configured SslContext.- Author:
- Julien Viet
-
Method Summary
Modifier and TypeMethodDescriptiondefault SslContextFactoryapplicationProtocols(List<String> applicationProtocols) Set the application protocols to use when using ALPN.io.netty.handler.ssl.SslContextcreate()default SslContextFactoryenabledCipherSuites(Set<String> enabledCipherSuites) Set the enabled cipher suites.default SslContextFactoryenabledProtocols(Set<String> enabledProtocols) default SslContextFactoryforClient(SNIServerName serverName, String endpointIdentificationAlgorithm) Configure the factory to build for clientdefault SslContextFactoryforServer(io.netty.handler.ssl.ClientAuth clientAuth) Configure the factory to build for serverdefault SslContextFactorySet the key manager factory to use.default SslContextFactorySet the trust manager factory to use.default SslContextFactoryuseAlpn(boolean useAlpn) Set whether to use ALPN.
-
Method Details
-
useAlpn
Set whether to use ALPN.- Parameters:
useAlpn-trueto use ALPN- Returns:
- a reference to this, so the API can be used fluently
-
forServer
Configure the factory to build for server- Parameters:
clientAuth- the client auth to use- Returns:
- a reference to this, so the API can be used fluently
-
forClient
default SslContextFactory forClient(SNIServerName serverName, String endpointIdentificationAlgorithm) Configure the factory to build for client- Parameters:
serverName- the optional server name- Returns:
- a reference to this, so the API can be used fluently
-
enabledProtocols
-
keyMananagerFactory
Set the key manager factory to use.- Parameters:
kmf- the key manager factory instance- Returns:
- a reference to this, so the API can be used fluently
-
trustManagerFactory
Set the trust manager factory to use.- Parameters:
tmf- the trust manager factory instance- Returns:
- a reference to this, so the API can be used fluently
-
enabledCipherSuites
Set the enabled cipher suites.- Parameters:
enabledCipherSuites- the set of cipher suites- Returns:
- a reference to this, so the API can be used fluently
-
applicationProtocols
Set the application protocols to use when using ALPN.- Parameters:
applicationProtocols- this list of application protocols- Returns:
- a reference to this, so the API can be used fluently
-
create
- Returns:
- a configured
SslContext - Throws:
SSLException
-