Package org.apache.bookkeeper.tls
Class TLSContextFactory
- java.lang.Object
-
- org.apache.bookkeeper.tls.TLSContextFactory
-
- All Implemented Interfaces:
SecurityHandlerFactory
public class TLSContextFactory extends java.lang.Object implements SecurityHandlerFactory
A factory to manage TLS contexts.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTLSContextFactory.KeyStoreTypeSupported Key File Types.-
Nested classes/interfaces inherited from interface org.apache.bookkeeper.tls.SecurityHandlerFactory
SecurityHandlerFactory.NodeType
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBCstatic java.lang.StringBC_FIPSstatic java.lang.StringBC_FIPS_PROVIDER_CLASSstatic java.lang.StringBC_NON_FIPS_PROVIDER_CLASSstatic java.security.ProviderBC_PROVIDER
-
Constructor Summary
Constructors Constructor Description TLSContextFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.security.ProvidergetBCProviderFromClassPath()Get Bouncy Castle provider from classpath, and call Security.addProvider.java.lang.StringgetHandlerName()static java.security.ProvidergetProvider()Get Bouncy Castle provider, and call Security.addProvider(provider) if success.voidinit(SecurityHandlerFactory.NodeType type, AbstractConfiguration conf, io.netty.buffer.ByteBufAllocator allocator)io.netty.handler.ssl.SslHandlernewTLSHandler()io.netty.handler.ssl.SslHandlernewTLSHandler(java.lang.String peer, int port)
-
-
-
Field Detail
-
BC_PROVIDER
public static final java.security.Provider BC_PROVIDER
-
BC_FIPS_PROVIDER_CLASS
public static final java.lang.String BC_FIPS_PROVIDER_CLASS
- See Also:
- Constant Field Values
-
BC_NON_FIPS_PROVIDER_CLASS
public static final java.lang.String BC_NON_FIPS_PROVIDER_CLASS
- See Also:
- Constant Field Values
-
BC_FIPS
public static final java.lang.String BC_FIPS
- See Also:
- Constant Field Values
-
BC
public static final java.lang.String BC
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProvider
public static java.security.Provider getProvider()
Get Bouncy Castle provider, and call Security.addProvider(provider) if success.
-
getBCProviderFromClassPath
public static java.security.Provider getBCProviderFromClassPath() throws java.lang.ExceptionGet Bouncy Castle provider from classpath, and call Security.addProvider. Throw Exception if failed.- Throws:
java.lang.Exception
-
getHandlerName
public java.lang.String getHandlerName()
- Specified by:
getHandlerNamein interfaceSecurityHandlerFactory
-
init
public void init(SecurityHandlerFactory.NodeType type, AbstractConfiguration conf, io.netty.buffer.ByteBufAllocator allocator) throws SecurityException
- Specified by:
initin interfaceSecurityHandlerFactory- Throws:
SecurityException
-
newTLSHandler
public io.netty.handler.ssl.SslHandler newTLSHandler()
- Specified by:
newTLSHandlerin interfaceSecurityHandlerFactory
-
newTLSHandler
public io.netty.handler.ssl.SslHandler newTLSHandler(java.lang.String peer, int port)- Specified by:
newTLSHandlerin interfaceSecurityHandlerFactory
-
-