Class KeyStoreSSLContext
java.lang.Object
org.apache.pulsar.common.util.keystoretls.KeyStoreSSLContext
KeyStoreSSLContext that mainly wrap a SSLContext to provide SSL context for both webservice and netty.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionKeyStoreSSLContext
(KeyStoreSSLContext.Mode mode, String sslProviderString, String keyStoreTypeString, String keyStorePath, String keyStorePassword, boolean allowInsecureConnection, String trustStoreTypeString, String trustStorePath, String trustStorePassword, boolean requireTrustedClientCertOnConnect, Set<String> ciphers, Set<String> protocols) -
Method Summary
Modifier and TypeMethodDescriptionstatic KeyStoreSSLContext
createClientKeyStoreSslContext
(String sslProviderString, String keyStoreTypeString, String keyStorePath, String keyStorePassword, boolean allowInsecureConnection, String trustStoreTypeString, String trustStorePath, String trustStorePassword, Set<String> ciphers, Set<String> protocols) static SSLContext
createClientSslContext
(String sslProviderString, String keyStoreTypeString, String keyStorePath, String keyStorePassword, boolean allowInsecureConnection, String trustStoreTypeString, String trustStorePath, String trustStorePassword, Set<String> ciphers, Set<String> protocol) static SSLContext
createClientSslContext
(String keyStoreTypeString, String keyStorePath, String keyStorePassword, String trustStoreTypeString, String trustStorePath, String trustStorePassword) static KeyStoreSSLContext
createServerKeyStoreSslContext
(String sslProviderString, String keyStoreTypeString, String keyStorePath, String keyStorePassword, boolean allowInsecureConnection, String trustStoreTypeString, String trustStorePath, String trustStorePassword, boolean requireTrustedClientCertOnConnect, Set<String> ciphers, Set<String> protocols) static SSLContext
createServerSslContext
(String sslProviderString, String keyStoreTypeString, String keyStorePath, String keyStorePassword, boolean allowInsecureConnection, String trustStoreTypeString, String trustStorePath, String trustStorePassword, boolean requireTrustedClientCertOnConnect) createSSLEngine
(String peerHost, int peerPort)
-
Field Details
-
DEFAULT_KEYSTORE_TYPE
- See Also:
-
DEFAULT_SSL_PROTOCOL
- See Also:
-
DEFAULT_SSL_ENABLED_PROTOCOLS
- See Also:
-
DEFAULT_SSL_KEYMANGER_ALGORITHM
-
DEFAULT_SSL_TRUSTMANAGER_ALGORITHM
-
BC_PROVIDER
-
-
Constructor Details
-
KeyStoreSSLContext
public KeyStoreSSLContext(KeyStoreSSLContext.Mode mode, String sslProviderString, String keyStoreTypeString, String keyStorePath, String keyStorePassword, boolean allowInsecureConnection, String trustStoreTypeString, String trustStorePath, String trustStorePassword, boolean requireTrustedClientCertOnConnect, Set<String> ciphers, Set<String> protocols)
-
-
Method Details
-
createSSLContext
- Throws:
GeneralSecurityException
IOException
-
getSslContext
-
createSSLEngine
-
createSSLEngine
-
createClientKeyStoreSslContext
public static KeyStoreSSLContext createClientKeyStoreSslContext(String sslProviderString, String keyStoreTypeString, String keyStorePath, String keyStorePassword, boolean allowInsecureConnection, String trustStoreTypeString, String trustStorePath, String trustStorePassword, Set<String> ciphers, Set<String> protocols) throws GeneralSecurityException, IOException - Throws:
GeneralSecurityException
IOException
-
createServerKeyStoreSslContext
public static KeyStoreSSLContext createServerKeyStoreSslContext(String sslProviderString, String keyStoreTypeString, String keyStorePath, String keyStorePassword, boolean allowInsecureConnection, String trustStoreTypeString, String trustStorePath, String trustStorePassword, boolean requireTrustedClientCertOnConnect, Set<String> ciphers, Set<String> protocols) throws GeneralSecurityException, IOException - Throws:
GeneralSecurityException
IOException
-
createServerSslContext
public static SSLContext createServerSslContext(String sslProviderString, String keyStoreTypeString, String keyStorePath, String keyStorePassword, boolean allowInsecureConnection, String trustStoreTypeString, String trustStorePath, String trustStorePassword, boolean requireTrustedClientCertOnConnect) throws GeneralSecurityException, IOException - Throws:
GeneralSecurityException
IOException
-
createClientSslContext
public static SSLContext createClientSslContext(String sslProviderString, String keyStoreTypeString, String keyStorePath, String keyStorePassword, boolean allowInsecureConnection, String trustStoreTypeString, String trustStorePath, String trustStorePassword, Set<String> ciphers, Set<String> protocol) throws GeneralSecurityException, IOException - Throws:
GeneralSecurityException
IOException
-
createClientSslContext
public static SSLContext createClientSslContext(String keyStoreTypeString, String keyStorePath, String keyStorePassword, String trustStoreTypeString, String trustStorePath, String trustStorePassword) throws GeneralSecurityException, IOException - Throws:
GeneralSecurityException
IOException
-