Package io.netty.handler.ssl
Class OpenSslServerContext
- java.lang.Object
-
- io.netty.handler.ssl.SslContext
-
- io.netty.handler.ssl.ReferenceCountedOpenSslContext
-
- io.netty.handler.ssl.OpenSslContext
-
- io.netty.handler.ssl.OpenSslServerContext
-
- All Implemented Interfaces:
ReferenceCounted
public final class OpenSslServerContext extends OpenSslContext
A server-sideSslContextwhich uses OpenSSL's SSL/TLS implementation.This class will use a finalizer to ensure native resources are automatically cleaned up. To avoid finalizers and manually release the native memory see
ReferenceCountedOpenSslServerContext.
-
-
Field Summary
-
Fields inherited from class io.netty.handler.ssl.ReferenceCountedOpenSslContext
ctx, VERIFY_DEPTH
-
-
Constructor Summary
Constructors Constructor Description OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile)Deprecated.OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword)Deprecated.OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, java.lang.Iterable<java.lang.String> ciphers, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout)Deprecated.OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout)Deprecated.OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, java.lang.Iterable<java.lang.String> ciphers, java.lang.Iterable<java.lang.String> nextProtocols, long sessionCacheSize, long sessionTimeout)Deprecated.OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.lang.Iterable<java.lang.String> ciphers, ApplicationProtocolConfig config, long sessionCacheSize, long sessionTimeout)Deprecated.OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig config, long sessionCacheSize, long sessionTimeout)Deprecated.OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, OpenSslApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout)Deprecated.useSslContextBuilder}OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.lang.Iterable<java.lang.String> ciphers, OpenSslApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout)Deprecated.OpenSslServerContext(java.io.File trustCertCollectionFile, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.io.File keyCertChainFile, java.io.File keyFile, java.lang.String keyPassword, javax.net.ssl.KeyManagerFactory keyManagerFactory, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig config, long sessionCacheSize, long sessionTimeout)Deprecated.OpenSslServerContext(java.io.File trustCertCollectionFile, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.io.File keyCertChainFile, java.io.File keyFile, java.lang.String keyPassword, javax.net.ssl.KeyManagerFactory keyManagerFactory, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, OpenSslApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OpenSslServerSessionContextsessionContext()Returns theSSLSessionContextobject held by this context.-
Methods inherited from class io.netty.handler.ssl.OpenSslContext
finalize
-
Methods inherited from class io.netty.handler.ssl.ReferenceCountedOpenSslContext
applicationProtocolNegotiator, certificates, chooseTrustManager, chooseX509KeyManager, cipherSuites, context, getBioNonApplicationBufferSize, getRejectRemoteInitiatedRenegotiation, isClient, newEngine, newEngine, newHandler, newHandler, newHandler, newHandler, refCnt, release, release, retain, retain, setBioNonApplicationBufferSize, setPrivateKeyMethod, setRejectRemoteInitiatedRenegotiation, setTicketKeys, setUseTasks, sslCtxPointer, stats, touch, touch
-
Methods inherited from class io.netty.handler.ssl.SslContext
attributes, buildKeyManagerFactory, buildKeyStore, buildTrustManagerFactory, buildTrustManagerFactory, buildTrustManagerFactory, defaultClientProvider, defaultServerProvider, generateKeySpec, isServer, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newHandler, newHandler, newHandler, newHandler, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, nextProtocols, sessionCacheSize, sessionTimeout, toPrivateKey, toPrivateKey, toX509Certificates, toX509Certificates
-
-
-
-
Constructor Detail
-
OpenSslServerContext
@Deprecated public OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile) throws javax.net.ssl.SSLExceptionDeprecated.Creates a new instance.- Parameters:
certChainFile- an X.509 certificate chain file in PEM formatkeyFile- a PKCS#8 private key file in PEM format- Throws:
javax.net.ssl.SSLException
-
OpenSslServerContext
@Deprecated public OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword) throws javax.net.ssl.SSLExceptionDeprecated.Creates a new instance.- Parameters:
certChainFile- an X.509 certificate chain file in PEM formatkeyFile- a PKCS#8 private key file in PEM formatkeyPassword- the password of thekeyFile.nullif it's not password-protected.- Throws:
javax.net.ssl.SSLException
-
OpenSslServerContext
@Deprecated public OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, java.lang.Iterable<java.lang.String> ciphers, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout) throws javax.net.ssl.SSLExceptionDeprecated.Creates a new instance.- Parameters:
certChainFile- an X.509 certificate chain file in PEM formatkeyFile- a PKCS#8 private key file in PEM formatkeyPassword- the password of thekeyFile.nullif it's not password-protected.ciphers- the cipher suites to enable, in the order of preference.nullto use the default cipher suites.apn- Provides a means to configure parameters related to application protocol negotiation.sessionCacheSize- the size of the cache used for storing SSL session objects.0to use the default value.sessionTimeout- the timeout for the cached SSL session objects, in seconds.0to use the default value.- Throws:
javax.net.ssl.SSLException
-
OpenSslServerContext
@Deprecated public OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, java.lang.Iterable<java.lang.String> ciphers, java.lang.Iterable<java.lang.String> nextProtocols, long sessionCacheSize, long sessionTimeout) throws javax.net.ssl.SSLExceptionDeprecated.Creates a new instance.- Parameters:
certChainFile- an X.509 certificate chain file in PEM formatkeyFile- a PKCS#8 private key file in PEM formatkeyPassword- the password of thekeyFile.nullif it's not password-protected.ciphers- the cipher suites to enable, in the order of preference.nullto use the default cipher suites.nextProtocols- the application layer protocols to accept, in the order of preference.nullto disable TLS NPN/ALPN extension.sessionCacheSize- the size of the cache used for storing SSL session objects.0to use the default value.sessionTimeout- the timeout for the cached SSL session objects, in seconds.0to use the default value.- Throws:
javax.net.ssl.SSLException
-
OpenSslServerContext
@Deprecated public OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.lang.Iterable<java.lang.String> ciphers, ApplicationProtocolConfig config, long sessionCacheSize, long sessionTimeout) throws javax.net.ssl.SSLExceptionDeprecated.Creates a new instance.- Parameters:
certChainFile- an X.509 certificate chain file in PEM formatkeyFile- a PKCS#8 private key file in PEM formatkeyPassword- the password of thekeyFile.nullif it's not password-protected.ciphers- the cipher suites to enable, in the order of preference.nullto use the default cipher suites.config- Application protocol config.sessionCacheSize- the size of the cache used for storing SSL session objects.0to use the default value.sessionTimeout- the timeout for the cached SSL session objects, in seconds.0to use the default value.- Throws:
javax.net.ssl.SSLException
-
OpenSslServerContext
@Deprecated public OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.lang.Iterable<java.lang.String> ciphers, OpenSslApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout) throws javax.net.ssl.SSLExceptionDeprecated.Creates a new instance.- Parameters:
certChainFile- an X.509 certificate chain file in PEM formatkeyFile- a PKCS#8 private key file in PEM formatkeyPassword- the password of thekeyFile.nullif it's not password-protected.ciphers- the cipher suites to enable, in the order of preference.nullto use the default cipher suites.apn- Application protocol negotiator.sessionCacheSize- the size of the cache used for storing SSL session objects.0to use the default value.sessionTimeout- the timeout for the cached SSL session objects, in seconds.0to use the default value.- Throws:
javax.net.ssl.SSLException
-
OpenSslServerContext
@Deprecated public OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout) throws javax.net.ssl.SSLExceptionDeprecated.Creates a new instance.- Parameters:
certChainFile- an X.509 certificate chain file in PEM formatkeyFile- a PKCS#8 private key file in PEM formatkeyPassword- the password of thekeyFile.nullif it's not password-protected.ciphers- the cipher suites to enable, in the order of preference.nullto use the default cipher suites.cipherFilter- a filter to apply over the supplied list of ciphersapn- Provides a means to configure parameters related to application protocol negotiation.sessionCacheSize- the size of the cache used for storing SSL session objects.0to use the default value.sessionTimeout- the timeout for the cached SSL session objects, in seconds.0to use the default value.- Throws:
javax.net.ssl.SSLException
-
OpenSslServerContext
@Deprecated public OpenSslServerContext(java.io.File trustCertCollectionFile, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.io.File keyCertChainFile, java.io.File keyFile, java.lang.String keyPassword, javax.net.ssl.KeyManagerFactory keyManagerFactory, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig config, long sessionCacheSize, long sessionTimeout) throws javax.net.ssl.SSLExceptionDeprecated.Creates a new instance.- Parameters:
trustCertCollectionFile- an X.509 certificate collection file in PEM format. This provides the certificate collection used for mutual authentication.nullto use the system defaulttrustManagerFactory- theTrustManagerFactorythat provides theTrustManagers that verifies the certificates sent from clients.nullto use the default or the results of parsingtrustCertCollectionFile.keyCertChainFile- an X.509 certificate chain file in PEM formatkeyFile- a PKCS#8 private key file in PEM formatkeyPassword- the password of thekeyFile.nullif it's not password-protected.keyManagerFactory- theKeyManagerFactorythat provides theKeyManagers that is used to encrypt data being sent to clients.nullto use the default or the results of parsingkeyCertChainFileandkeyFile.ciphers- the cipher suites to enable, in the order of preference.nullto use the default cipher suites.cipherFilter- a filter to apply over the supplied list of ciphers Only required ifproviderisSslProvider.JDKconfig- Provides a means to configure parameters related to application protocol negotiation.sessionCacheSize- the size of the cache used for storing SSL session objects.0to use the default value.sessionTimeout- the timeout for the cached SSL session objects, in seconds.0to use the default value.- Throws:
javax.net.ssl.SSLException
-
OpenSslServerContext
@Deprecated public OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig config, long sessionCacheSize, long sessionTimeout) throws javax.net.ssl.SSLExceptionDeprecated.Creates a new instance.- Parameters:
certChainFile- an X.509 certificate chain file in PEM formatkeyFile- a PKCS#8 private key file in PEM formatkeyPassword- the password of thekeyFile.nullif it's not password-protected.ciphers- the cipher suites to enable, in the order of preference.nullto use the default cipher suites.cipherFilter- a filter to apply over the supplied list of ciphersconfig- Application protocol config.sessionCacheSize- the size of the cache used for storing SSL session objects.0to use the default value.sessionTimeout- the timeout for the cached SSL session objects, in seconds.0to use the default value.- Throws:
javax.net.ssl.SSLException
-
OpenSslServerContext
@Deprecated public OpenSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, OpenSslApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout) throws javax.net.ssl.SSLExceptionDeprecated.useSslContextBuilder}Creates a new instance.- Parameters:
certChainFile- an X.509 certificate chain file in PEM formatkeyFile- a PKCS#8 private key file in PEM formatkeyPassword- the password of thekeyFile.nullif it's not password-protected.ciphers- the cipher suites to enable, in the order of preference.nullto use the default cipher suites.cipherFilter- a filter to apply over the supplied list of ciphersapn- Application protocol negotiator.sessionCacheSize- the size of the cache used for storing SSL session objects.0to use the default value.sessionTimeout- the timeout for the cached SSL session objects, in seconds.0to use the default value.- Throws:
javax.net.ssl.SSLException
-
OpenSslServerContext
@Deprecated public OpenSslServerContext(java.io.File trustCertCollectionFile, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.io.File keyCertChainFile, java.io.File keyFile, java.lang.String keyPassword, javax.net.ssl.KeyManagerFactory keyManagerFactory, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, OpenSslApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout) throws javax.net.ssl.SSLExceptionDeprecated.Creates a new instance.- Parameters:
trustCertCollectionFile- an X.509 certificate collection file in PEM format. This provides the certificate collection used for mutual authentication.nullto use the system defaulttrustManagerFactory- theTrustManagerFactorythat provides theTrustManagers that verifies the certificates sent from clients.nullto use the default or the results of parsingtrustCertCollectionFile.keyCertChainFile- an X.509 certificate chain file in PEM formatkeyFile- a PKCS#8 private key file in PEM formatkeyPassword- the password of thekeyFile.nullif it's not password-protected.keyManagerFactory- theKeyManagerFactorythat provides theKeyManagers that is used to encrypt data being sent to clients.nullto use the default or the results of parsingkeyCertChainFileandkeyFile.ciphers- the cipher suites to enable, in the order of preference.nullto use the default cipher suites.cipherFilter- a filter to apply over the supplied list of ciphers Only required ifproviderisSslProvider.JDKapn- Application Protocol Negotiator objectsessionCacheSize- the size of the cache used for storing SSL session objects.0to use the default value.sessionTimeout- the timeout for the cached SSL session objects, in seconds.0to use the default value.- 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
-
-