public interface TlsContextFactory
This factory provides methods for creating client and server socket factories that will be already configured according to the current context.
| Modifier and Type | Method and Description |
|---|---|
static TlsContextFactoryBuilder |
builder()
Provides a builder to create custom
TlsContextFactory objects or obtain the default one. |
SSLServerSocketFactory |
createServerSocketFactory()
Allows the creation of a
SSLServerSocketFactory that restricts the available protocols and cipher suites in the sockets
that are created according to the enabled ones (see getEnabledProtocols() and getEnabledCipherSuites()). |
SSLSocketFactory |
createSocketFactory()
Allows the creation of a
SSLSocketFactory that restricts the available protocols and cipher suites in the sockets
that are created according to the enabled ones (see getEnabledProtocols() and getEnabledCipherSuites()). |
SSLContext |
createSslContext()
Allows the creation of an
SSLContext with the configured keystore and trust store. |
String[] |
getEnabledCipherSuites()
The list of ciphers that must be used to restrict the creation of the SSL Sockets
|
String[] |
getEnabledProtocols()
The list of enabled protocols that must be used to restrict the creation of the SSL Sockets
|
TlsContextKeyStoreConfiguration |
getKeyStoreConfiguration() |
TlsContextTrustStoreConfiguration |
getTrustStoreConfiguration() |
boolean |
isKeyStoreConfigured() |
boolean |
isTrustStoreConfigured() |
static TlsContextFactoryBuilder builder()
TlsContextFactory objects or obtain the default one.TlsContextFactoryBuilderSSLContext createSslContext() throws KeyManagementException, NoSuchAlgorithmException
SSLContext with the configured keystore and trust store. You must use getEnabledProtocols()
and getEnabledCipherSuites() to further configure your TLS environment. The resulting SSLContext should not
be used to create SSLSocketFactory or SSLServerSocketFactory directly, use createSocketFactory() and
createServerSocketFactory() instead, otherwise protocols and ciphers will not be enforced.KeyManagementExceptionNoSuchAlgorithmExceptionSSLSocketFactory createSocketFactory() throws KeyManagementException, NoSuchAlgorithmException
SSLSocketFactory that restricts the available protocols and cipher suites in the sockets
that are created according to the enabled ones (see getEnabledProtocols() and getEnabledCipherSuites()).SSLSocketFactoryKeyManagementExceptionNoSuchAlgorithmExceptionSSLServerSocketFactory createServerSocketFactory() throws KeyManagementException, NoSuchAlgorithmException
SSLServerSocketFactory that restricts the available protocols and cipher suites in the sockets
that are created according to the enabled ones (see getEnabledProtocols() and getEnabledCipherSuites()).SSLServerSocketFactoryKeyManagementExceptionNoSuchAlgorithmExceptionString[] getEnabledCipherSuites()
String[] getEnabledProtocols()
boolean isKeyStoreConfigured()
boolean isTrustStoreConfigured()
TlsContextKeyStoreConfiguration getKeyStoreConfiguration()
TlsContextTrustStoreConfiguration getTrustStoreConfiguration()
Copyright © 2017 MuleSoft, Inc.. All rights reserved.