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
A server-side
SslContext
which uses OpenSSL's SSL/TLS implementation.
Instances of this class must be released
or else native memory will leak!
Instances of this class must not be released before any ReferenceCountedOpenSslEngine
which depends upon the instance of this class is released. Otherwise if any method of
ReferenceCountedOpenSslEngine
is called which uses this class's JNI resources the JVM may crash.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
private static final class
private static final class
private static final class
Nested classes/interfaces inherited from class io.netty.handler.ssl.ReferenceCountedOpenSslContext
ReferenceCountedOpenSslContext.AbstractCertificateVerifier
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]
private static final InternalLogger
private final OpenSslServerSessionContext
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, engineMap, hasTLSv13Cipher, 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, X509_CERT_FACTORY
-
Constructor Summary
ConstructorsConstructorDescriptionReferenceCountedOpenSslServerContext
(X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory, X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth, String[] protocols, boolean startTls, boolean enableOcsp, String keyStore, Map.Entry<SslContextOption<?>, Object>... options) ReferenceCountedOpenSslServerContext
(X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory, X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, OpenSslApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth, String[] protocols, boolean startTls, boolean enableOcsp, String keyStore, Map.Entry<SslContextOption<?>, Object>... options) -
Method Summary
Modifier and TypeMethodDescription(package private) static OpenSslServerSessionContext
newSessionContext
(ReferenceCountedOpenSslContext thiz, long ctx, OpenSslEngineMap engineMap, X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory, X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, KeyManagerFactory keyManagerFactory, String keyStore, long sessionCacheSize, long sessionTimeout) Returns theSSLSessionContext
object held by this context.private static void
setVerifyCallback
(long ctx, OpenSslEngineMap engineMap, X509TrustManager manager) Methods inherited from class io.netty.handler.ssl.ReferenceCountedOpenSslContext
applicationProtocolNegotiator, certificates, 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 Details
-
logger
-
ID
private static final byte[] ID -
sessionContext
-
-
Constructor Details
-
ReferenceCountedOpenSslServerContext
ReferenceCountedOpenSslServerContext(X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory, X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth, String[] protocols, boolean startTls, boolean enableOcsp, String keyStore, Map.Entry<SslContextOption<?>, Object>... options) throws SSLException- Throws:
SSLException
-
ReferenceCountedOpenSslServerContext
ReferenceCountedOpenSslServerContext(X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory, X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, OpenSslApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth, String[] protocols, boolean startTls, boolean enableOcsp, String keyStore, Map.Entry<SslContextOption<?>, Object>... options) throws SSLException- Throws:
SSLException
-
-
Method Details
-
sessionContext
Description copied from class:SslContext
Returns theSSLSessionContext
object held by this context.- Specified by:
sessionContext
in classReferenceCountedOpenSslContext
-
newSessionContext
static OpenSslServerSessionContext newSessionContext(ReferenceCountedOpenSslContext thiz, long ctx, OpenSslEngineMap engineMap, X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory, X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, KeyManagerFactory keyManagerFactory, String keyStore, long sessionCacheSize, long sessionTimeout) throws SSLException - Throws:
SSLException
-
setVerifyCallback
private static void setVerifyCallback(long ctx, OpenSslEngineMap engineMap, X509TrustManager manager)
-