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
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKeyStoreSSLContext(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 KeyStoreSSLContextcreateClientKeyStoreSslContext(String sslProviderString, String keyStoreTypeString, String keyStorePath, String keyStorePassword, boolean allowInsecureConnection, String trustStoreTypeString, String trustStorePath, String trustStorePassword, Set<String> ciphers, Set<String> protocols) static SSLContextcreateClientSslContext(String sslProviderString, String keyStoreTypeString, String keyStorePath, String keyStorePassword, boolean allowInsecureConnection, String trustStoreTypeString, String trustStorePath, String trustStorePassword, Set<String> ciphers, Set<String> protocol) static SSLContextcreateClientSslContext(String keyStoreTypeString, String keyStorePath, String keyStorePassword, String trustStoreTypeString, String trustStorePath, String trustStorePassword) static KeyStoreSSLContextcreateServerKeyStoreSslContext(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 SSLContextcreateServerSslContext(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:
GeneralSecurityExceptionIOException
-
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:
GeneralSecurityExceptionIOException
-
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:
GeneralSecurityExceptionIOException
-
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:
GeneralSecurityExceptionIOException
-
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:
GeneralSecurityExceptionIOException
-
createClientSslContext
public static SSLContext createClientSslContext(String keyStoreTypeString, String keyStorePath, String keyStorePassword, String trustStoreTypeString, String trustStorePath, String trustStorePassword) throws GeneralSecurityException, IOException - Throws:
GeneralSecurityExceptionIOException
-