Package org.apache.bookkeeper.tls
Class TLSContextFactory
java.lang.Object
org.apache.bookkeeper.tls.TLSContextFactory
- All Implemented Interfaces:
SecurityHandlerFactory
A factory to manage TLS contexts.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSupported Key File Types.Nested classes/interfaces inherited from interface org.apache.bookkeeper.tls.SecurityHandlerFactory
SecurityHandlerFactory.NodeType -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProviderGet Bouncy Castle provider from classpath, and call Security.addProvider.static ProviderGet 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.SslHandlerio.netty.handler.ssl.SslHandlernewTLSHandler(String peer, int port)
-
Field Details
-
BC_PROVIDER
-
BC_FIPS_PROVIDER_CLASS
- See Also:
-
BC_NON_FIPS_PROVIDER_CLASS
- See Also:
-
BC_FIPS
- See Also:
-
BC
- See Also:
-
-
Constructor Details
-
TLSContextFactory
public TLSContextFactory()
-
-
Method Details
-
getProvider
Get Bouncy Castle provider, and call Security.addProvider(provider) if success. -
getBCProviderFromClassPath
Get Bouncy Castle provider from classpath, and call Security.addProvider. Throw Exception if failed.- Throws:
Exception
-
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
- Specified by:
newTLSHandlerin interfaceSecurityHandlerFactory
-