Package io.netty.handler.ssl
Class ReferenceCountedOpenSslClientContext
java.lang.Object
io.netty.handler.ssl.SslContext
io.netty.handler.ssl.ReferenceCountedOpenSslContext
io.netty.handler.ssl.ReferenceCountedOpenSslClientContext
- All Implemented Interfaces:
ReferenceCounted
A client-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
(package private) static final class
private static final class
Nested classes/interfaces inherited from class io.netty.handler.ssl.ReferenceCountedOpenSslContext
ReferenceCountedOpenSslContext.AbstractCertificateVerifier
-
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionReferenceCountedOpenSslClientContext
(X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory, X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, String[] protocols, long sessionCacheSize, long sessionTimeout, boolean enableOcsp, String keyStore, String endpointIdentificationAlgorithm, ResumptionController resumptionController, Map.Entry<SslContextOption<?>, Object>... options) -
Method Summary
Modifier and TypeMethodDescription(package private) static OpenSslSessionContext
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, ResumptionController resumptionController) 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, 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
-
SUPPORTED_KEY_TYPES
-
sessionContext
-
-
Constructor Details
-
ReferenceCountedOpenSslClientContext
ReferenceCountedOpenSslClientContext(X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory, X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, String[] protocols, long sessionCacheSize, long sessionTimeout, boolean enableOcsp, String keyStore, String endpointIdentificationAlgorithm, ResumptionController resumptionController, 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 OpenSslSessionContext 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, ResumptionController resumptionController) throws SSLException - Throws:
SSLException
-
setVerifyCallback
private static void setVerifyCallback(long ctx, OpenSslEngineMap engineMap, X509TrustManager manager)
-