Package com.linkedin.alpini.netty4.ssl
Class SSLEngineFactoryImpl
- java.lang.Object
-
- com.linkedin.alpini.netty4.ssl.SSLEngineFactoryImpl
-
- All Implemented Interfaces:
SslFactory
,SSLEngineFactory
public class SSLEngineFactoryImpl extends java.lang.Object implements SSLEngineFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SSLEngineFactoryImpl.Config
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]
CIPHER_SUITE_ALLOWLIST
-
Constructor Summary
Constructors Constructor Description SSLEngineFactoryImpl(SSLEngineFactoryImpl.Config config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.handler.ssl.SslContext
context(boolean isServer)
The default implementation for the anonymous classes below.javax.net.ssl.SSLEngine
createSSLEngine(io.netty.buffer.ByteBufAllocator alloc, boolean isServer)
javax.net.ssl.SSLEngine
createSSLEngine(io.netty.buffer.ByteBufAllocator alloc, java.lang.String host, int port, boolean isServer)
static java.lang.String[]
filterDisallowedCiphersuites(java.lang.String[] ciphersuites)
javax.net.ssl.SSLContext
getSSLContext()
javax.net.ssl.SSLParameters
getSSLParameters()
boolean
isSslEnabled()
boolean
isSslRequireClientCerts()
javax.net.ssl.SSLSessionContext
sessionContext(boolean isServer)
void
setSslRequireClientCerts(boolean sslRequireClientCerts)
-
-
-
Constructor Detail
-
SSLEngineFactoryImpl
public SSLEngineFactoryImpl(SSLEngineFactoryImpl.Config config) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-
Method Detail
-
filterDisallowedCiphersuites
public static java.lang.String[] filterDisallowedCiphersuites(java.lang.String[] ciphersuites) throws javax.net.ssl.SSLProtocolException
- Throws:
javax.net.ssl.SSLProtocolException
-
getSSLContext
public javax.net.ssl.SSLContext getSSLContext()
- Specified by:
getSSLContext
in interfaceSslFactory
- Returns:
- an
SSLContext
object - See Also:
SSLContext
-
getSSLParameters
public javax.net.ssl.SSLParameters getSSLParameters()
- Specified by:
getSSLParameters
in interfaceSslFactory
- Returns:
- an
SSLParameters
object - See Also:
SSLParameters
-
isSslEnabled
public boolean isSslEnabled()
- Specified by:
isSslEnabled
in interfaceSslFactory
- Returns:
- Whether the implementation enforces SSL
-
isSslRequireClientCerts
public boolean isSslRequireClientCerts()
-
setSslRequireClientCerts
public void setSslRequireClientCerts(boolean sslRequireClientCerts)
-
context
public io.netty.handler.ssl.SslContext context(boolean isServer)
Description copied from interface:SSLEngineFactory
The default implementation for the anonymous classes below. :69- Specified by:
context
in interfaceSSLEngineFactory
- Parameters:
isServer
-true
for server SSL context.- Returns:
- instance of SslContext
-
createSSLEngine
public javax.net.ssl.SSLEngine createSSLEngine(io.netty.buffer.ByteBufAllocator alloc, java.lang.String host, int port, boolean isServer)
- Specified by:
createSSLEngine
in interfaceSSLEngineFactory
-
createSSLEngine
public javax.net.ssl.SSLEngine createSSLEngine(io.netty.buffer.ByteBufAllocator alloc, boolean isServer)
- Specified by:
createSSLEngine
in interfaceSSLEngineFactory
-
sessionContext
public javax.net.ssl.SSLSessionContext sessionContext(boolean isServer)
- Specified by:
sessionContext
in interfaceSSLEngineFactory
-
-