Package io.netty.handler.ssl
Class ReferenceCountedOpenSslServerContext
- java.lang.Object
-
- io.netty.handler.ssl.SslContext
-
- io.netty.handler.ssl.ReferenceCountedOpenSslContext
-
- io.netty.handler.ssl.ReferenceCountedOpenSslServerContext
-
- All Implemented Interfaces:
ReferenceCounted
public final class ReferenceCountedOpenSslServerContext extends ReferenceCountedOpenSslContext
A server-sideSslContextwhich uses OpenSSL's SSL/TLS implementation.Instances of this class must be
releasedor else native memory will leak!Instances of this class must not be released before any
ReferenceCountedOpenSslEnginewhich depends upon the instance of this class is released. Otherwise if any method ofReferenceCountedOpenSslEngineis called which uses this class's JNI resources the JVM may crash.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classReferenceCountedOpenSslServerContext.ExtendedTrustManagerVerifyCallbackprivate static classReferenceCountedOpenSslServerContext.OpenSslServerCertificateCallbackprivate static classReferenceCountedOpenSslServerContext.OpenSslSniHostnameMatcherprivate static classReferenceCountedOpenSslServerContext.TrustManagerVerifyCallback-
Nested classes/interfaces inherited from class io.netty.handler.ssl.ReferenceCountedOpenSslContext
ReferenceCountedOpenSslContext.AbstractCertificateVerifier
-
-
Field Summary
Fields Modifier and Type Field Description private static byte[]IDprivate static InternalLoggerloggerprivate OpenSslServerSessionContextsessionContext-
Fields inherited from class io.netty.handler.ssl.ReferenceCountedOpenSslContext
CLIENT_ENABLE_SESSION_CACHE, CLIENT_ENABLE_SESSION_TICKET, CLIENT_ENABLE_SESSION_TICKET_TLSV13, clientAuth, ctx, ctxLock, enableOcsp, endpointIdentificationAlgorithm, engineMap, hasTLSv13Cipher, hasTmpDhKeys, keyCertChain, NONE_PROTOCOL_NEGOTIATOR, protocols, SERVER_ENABLE_SESSION_CACHE, SERVER_ENABLE_SESSION_TICKET, SERVER_ENABLE_SESSION_TICKET_TLSV13, tlsFalseStart, USE_TASKS, VERIFY_DEPTH
-
Fields inherited from class io.netty.handler.ssl.SslContext
ALIAS, resumptionController, X509_CERT_FACTORY
-
-
Constructor Summary
Constructors Constructor Description ReferenceCountedOpenSslServerContext(java.security.cert.X509Certificate[] trustCertCollection, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.security.cert.X509Certificate[] keyCertChain, java.security.PrivateKey key, java.lang.String keyPassword, javax.net.ssl.KeyManagerFactory keyManagerFactory, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth, java.lang.String[] protocols, boolean startTls, boolean enableOcsp, java.lang.String keyStore, ResumptionController resumptionController, java.util.Map.Entry<SslContextOption<?>,java.lang.Object>... options)ReferenceCountedOpenSslServerContext(java.security.cert.X509Certificate[] trustCertCollection, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.security.cert.X509Certificate[] keyCertChain, java.security.PrivateKey key, java.lang.String keyPassword, javax.net.ssl.KeyManagerFactory keyManagerFactory, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, OpenSslApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth, java.lang.String[] protocols, boolean startTls, boolean enableOcsp, java.lang.String keyStore, ResumptionController resumptionController, java.util.Map.Entry<SslContextOption<?>,java.lang.Object>... options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static OpenSslServerSessionContextnewSessionContext(ReferenceCountedOpenSslContext thiz, long ctx, OpenSslEngineMap engineMap, java.security.cert.X509Certificate[] trustCertCollection, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.security.cert.X509Certificate[] keyCertChain, java.security.PrivateKey key, java.lang.String keyPassword, javax.net.ssl.KeyManagerFactory keyManagerFactory, java.lang.String keyStore, long sessionCacheSize, long sessionTimeout, ResumptionController resumptionController)OpenSslServerSessionContextsessionContext()Returns theSSLSessionContextobject held by this context.private static voidsetVerifyCallback(long ctx, OpenSslEngineMap engineMap, javax.net.ssl.X509TrustManager manager)-
Methods inherited from class io.netty.handler.ssl.ReferenceCountedOpenSslContext
applicationProtocolNegotiator, certificates, chooseTrustManager, chooseTrustManager, chooseX509KeyManager, cipherSuites, context, freeBio, getBioNonApplicationBufferSize, getRejectRemoteInitiatedRenegotiation, isClient, newEngine, newEngine, newEngine0, newHandler, newHandler, newHandler, newHandler, providerFor, refCnt, release, release, retain, retain, setBioNonApplicationBufferSize, setKeyMaterial, setPrivateKeyMethod, setRejectRemoteInitiatedRenegotiation, setTicketKeys, setUseTasks, sslCtxPointer, stats, toBIO, toBIO, toBIO, toNegotiator, touch, touch, useExtendedTrustManager
-
Methods inherited from class io.netty.handler.ssl.SslContext
attributes, buildKeyManagerFactory, buildKeyManagerFactory, buildKeyStore, buildTrustManagerFactory, buildTrustManagerFactory, buildTrustManagerFactory, defaultClientProvider, defaultServerProvider, generateKeySpec, isServer, keyStorePassword, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContextInternal, newHandler, newHandler, newHandler, newHandler, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContextInternal, nextProtocols, sessionCacheSize, sessionTimeout, toApplicationProtocolConfig, toPrivateKey, toPrivateKey, toPrivateKey, toPrivateKeyInternal, toX509Certificates, toX509Certificates, toX509CertificatesInternal
-
-
-
-
Field Detail
-
logger
private static final InternalLogger logger
-
ID
private static final byte[] ID
-
sessionContext
private final OpenSslServerSessionContext sessionContext
-
-
Constructor Detail
-
ReferenceCountedOpenSslServerContext
ReferenceCountedOpenSslServerContext(java.security.cert.X509Certificate[] trustCertCollection, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.security.cert.X509Certificate[] keyCertChain, java.security.PrivateKey key, java.lang.String keyPassword, javax.net.ssl.KeyManagerFactory keyManagerFactory, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth, java.lang.String[] protocols, boolean startTls, boolean enableOcsp, java.lang.String keyStore, ResumptionController resumptionController, java.util.Map.Entry<SslContextOption<?>,java.lang.Object>... options) throws javax.net.ssl.SSLException- Throws:
javax.net.ssl.SSLException
-
ReferenceCountedOpenSslServerContext
ReferenceCountedOpenSslServerContext(java.security.cert.X509Certificate[] trustCertCollection, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.security.cert.X509Certificate[] keyCertChain, java.security.PrivateKey key, java.lang.String keyPassword, javax.net.ssl.KeyManagerFactory keyManagerFactory, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, OpenSslApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth, java.lang.String[] protocols, boolean startTls, boolean enableOcsp, java.lang.String keyStore, ResumptionController resumptionController, java.util.Map.Entry<SslContextOption<?>,java.lang.Object>... options) throws javax.net.ssl.SSLException- Throws:
javax.net.ssl.SSLException
-
-
Method Detail
-
sessionContext
public OpenSslServerSessionContext sessionContext()
Description copied from class:SslContextReturns theSSLSessionContextobject held by this context.- Specified by:
sessionContextin classReferenceCountedOpenSslContext
-
newSessionContext
static OpenSslServerSessionContext newSessionContext(ReferenceCountedOpenSslContext thiz, long ctx, OpenSslEngineMap engineMap, java.security.cert.X509Certificate[] trustCertCollection, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.security.cert.X509Certificate[] keyCertChain, java.security.PrivateKey key, java.lang.String keyPassword, javax.net.ssl.KeyManagerFactory keyManagerFactory, java.lang.String keyStore, long sessionCacheSize, long sessionTimeout, ResumptionController resumptionController) throws javax.net.ssl.SSLException
- Throws:
javax.net.ssl.SSLException
-
setVerifyCallback
private static void setVerifyCallback(long ctx, OpenSslEngineMap engineMap, javax.net.ssl.X509TrustManager manager)
-
-