Top Description Inners Fields Constructors Methods
io.netty.handler.ssl

public final Class ReferenceCountedOpenSslServerContext

extends ReferenceCountedOpenSslContext
Class Inheritance
Imports
io.netty.buffer.ByteBufAllocator, io.netty.internal.tcnative.CertificateCallback, .SSL, .SSLContext, .SniHostNameMatcher, io.netty.util.CharsetUtil, io.netty.util.internal.PlatformDependent, .SuppressJava6Requirement, io.netty.util.internal.logging.InternalLogger, .InternalLoggerFactory, java.security.KeyStore, .PrivateKey, java.security.cert.X509Certificate, java.util.Map, javax.net.ssl.KeyManagerFactory, .SSLException, .TrustManagerFactory, .X509ExtendedTrustManager, .X509TrustManager

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 and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final byte[]
private static final InternalLogger
private final OpenSslServerSessionContext
Inherited from io.netty.handler.ssl.ReferenceCountedOpenSslContext:
CLIENT_ENABLE_SESSION_CACHECLIENT_ENABLE_SESSION_TICKETCLIENT_ENABLE_SESSION_TICKET_TLSV13clientAuthctxctxLockenableOcspengineMapkeyCertChainNONE_PROTOCOL_NEGOTIATORprotocolsSERVER_ENABLE_SESSION_CACHESERVER_ENABLE_SESSION_TICKETSERVER_ENABLE_SESSION_TICKET_TLSV13tlsFalseStartUSE_TASKSVERIFY_DEPTH

Constructor Summary

AccessConstructor and Description
pack-priv
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)

pack-priv
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)

Deprecated as a consequence of OpenSslApplicationProtocolNegotiator being deprecated.

Method Summary

Modifier and TypeMethod and Description
pack-priv 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)

public OpenSslServerSessionContext
sessionContext()

Implements abstract io.netty.handler.ssl.ReferenceCountedOpenSslContext.sessionContext.

Returns the SSLSessionContext object held by this context.
private static void
setVerifyCallback(long ctx, OpenSslEngineMap engineMap, X509TrustManager manager)

Inherited from io.netty.handler.ssl.ReferenceCountedOpenSslContext:
applicationProtocolNegotiatorcertificateschooseTrustManagerchooseX509KeyManagercipherSuitescontextfreeBiogetBioNonApplicationBufferSizegetRejectRemoteInitiatedRenegotiationisClientnewEnginenewEnginenewEngine0newHandlernewHandlernewHandlernewHandlerproviderForrefCntreleasereleaseretainretainsetBioNonApplicationBufferSizesetKeyMaterialsetPrivateKeyMethodsetRejectRemoteInitiatedRenegotiationsetTicketKeyssetUseTaskssslCtxPointerstatstoBIOtoBIOtoBIOtoNegotiatortouchtouchuseExtendedTrustManager

Field Detail

IDback to summary
private static final byte[] ID
loggerback to summary
private static final InternalLogger logger

Hides io.netty.handler.ssl.ReferenceCountedOpenSslContext.logger.

sessionContextback to summary
private final OpenSslServerSessionContext sessionContext

Constructor Detail

ReferenceCountedOpenSslServerContextback to summary
pack-priv 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
ReferenceCountedOpenSslServerContextback to summary
pack-priv 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

Deprecated

as a consequence of OpenSslApplicationProtocolNegotiator being deprecated. See corresponding docs for further information.

Method Detail

newSessionContextback to summary
pack-priv 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
sessionContextback to summary
public OpenSslServerSessionContext sessionContext()

Implements abstract io.netty.handler.ssl.ReferenceCountedOpenSslContext.sessionContext.

Doc from io.netty.handler.ssl.SslContext.sessionContext.

Returns the SSLSessionContext object held by this context.

Annotations
@Override
setVerifyCallbackback to summary
private static void setVerifyCallback(long ctx, OpenSslEngineMap engineMap, X509TrustManager manager)
Annotations
@SuppressJava6Requirement
reason:Guarded by java version check
io.netty.handler.ssl back to summary

private final Class ReferenceCountedOpenSslServerContext.ExtendedTrustManagerVerifyCallback

extends AbstractCertificateVerifier
Class Inheritance
Annotations
@SuppressJava6Requirement
reason:Usage guarded by java version check

Field Summary

Modifier and TypeField and Description
private final X509ExtendedTrustManager

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
Inherited from io.netty.handler.ssl.ReferenceCountedOpenSslContext.AbstractCertificateVerifier:
verify

Field Detail

managerback to summary
private final X509ExtendedTrustManager manager

Constructor Detail

ExtendedTrustManagerVerifyCallbackback to summary
pack-priv ExtendedTrustManagerVerifyCallback(OpenSslEngineMap engineMap, X509ExtendedTrustManager manager)

Method Detail

verifyback to summary
pack-priv void verify(ReferenceCountedOpenSslEngine engine, X509Certificate[] peerCerts, String auth) throws Exception

Implements abstract io.netty.handler.ssl.ReferenceCountedOpenSslContext.AbstractCertificateVerifier.verify.

Annotations
@Override
io.netty.handler.ssl back to summary

private final Class ReferenceCountedOpenSslServerContext.OpenSslServerCertificateCallback

extends Object
implements CertificateCallback
Class Inheritance
  • java.lang.Object
  • io.netty.handler.ssl.ReferenceCountedOpenSslServerContext.OpenSslServerCertificateCallback
All Implemented Interfaces
io.netty.internal.tcnative.CertificateCallback

Field Summary

Modifier and TypeField and Description
private final OpenSslEngineMap
private final OpenSslKeyMaterialManager

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
handle(long
the SSL instance
ssl
,
byte[]
an array of the key types on client-mode or null on server-mode.
keyTypeBytes
,
byte[][]
the principals or null.
asn1DerEncodedPrincipals
)

Implements io.netty.internal.tcnative.CertificateCallback.handle.

Called during cert selection.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

engineMapback to summary
private final OpenSslEngineMap engineMap
keyManagerHolderback to summary
private final OpenSslKeyMaterialManager keyManagerHolder

Constructor Detail

OpenSslServerCertificateCallbackback to summary
pack-priv OpenSslServerCertificateCallback(OpenSslEngineMap engineMap, OpenSslKeyMaterialManager keyManagerHolder)

Method Detail

handleback to summary
public void handle(long ssl, byte[] keyTypeBytes, byte[][] asn1DerEncodedPrincipals) throws Exception

Implements io.netty.internal.tcnative.CertificateCallback.handle.

Doc from io.netty.internal.tcnative.CertificateCallback.handle.

Called during cert selection. If a certificate chain / key should be used SSL#setKeyMaterial(long, long, long) must be called from this callback after all preparations / validations were completed.

Parameters
ssl:long

the SSL instance

keyTypeBytes:byte[]

an array of the key types on client-mode or null on server-mode.

asn1DerEncodedPrincipals:byte[][]

the principals or null.

Annotations
@Override
io.netty.handler.ssl back to summary

private final Class ReferenceCountedOpenSslServerContext.OpenSslSniHostnameMatcher

extends Object
implements SniHostNameMatcher
Class Inheritance
  • java.lang.Object
  • io.netty.handler.ssl.ReferenceCountedOpenSslServerContext.OpenSslSniHostnameMatcher
All Implemented Interfaces
io.netty.internal.tcnative.SniHostNameMatcher

Field Summary

Modifier and TypeField and Description
private final OpenSslEngineMap

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
match(long
the SSL instance
ssl
,
String
the hostname to match.
hostname
)

Implements io.netty.internal.tcnative.SniHostNameMatcher.match.

Returns true if the hostname was matched and so SNI should be allowed.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

engineMapback to summary
private final OpenSslEngineMap engineMap

Constructor Detail

OpenSslSniHostnameMatcherback to summary
pack-priv OpenSslSniHostnameMatcher(OpenSslEngineMap engineMap)

Method Detail

matchback to summary
public boolean match(long ssl, String hostname)

Implements io.netty.internal.tcnative.SniHostNameMatcher.match.

Doc from io.netty.internal.tcnative.SniHostNameMatcher.match.

Returns true if the hostname was matched and so SNI should be allowed.

Parameters
ssl:long

the SSL instance

hostname:String

the hostname to match.

Returns:boolean

true if the hostname was matched

Annotations
@Override
io.netty.handler.ssl back to summary

private final Class ReferenceCountedOpenSslServerContext.TrustManagerVerifyCallback

extends AbstractCertificateVerifier
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final X509TrustManager

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
Inherited from io.netty.handler.ssl.ReferenceCountedOpenSslContext.AbstractCertificateVerifier:
verify

Field Detail

managerback to summary
private final X509TrustManager manager

Constructor Detail

TrustManagerVerifyCallbackback to summary
pack-priv TrustManagerVerifyCallback(OpenSslEngineMap engineMap, X509TrustManager manager)

Method Detail

verifyback to summary
pack-priv void verify(ReferenceCountedOpenSslEngine engine, X509Certificate[] peerCerts, String auth) throws Exception

Implements abstract io.netty.handler.ssl.ReferenceCountedOpenSslContext.AbstractCertificateVerifier.verify.

Annotations
@Override