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

public final Class OpenSslServerContext

extends OpenSslContext
Class Inheritance
Imports
io.netty.internal.tcnative.SSL, java.io.File, java.security.KeyStore, .PrivateKey, java.security.cert.X509Certificate, java.util.Map, javax.net.ssl.KeyManager, .KeyManagerFactory, .SSLException, .TrustManager, .TrustManagerFactory

A server-side SslContext which 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

Modifier and TypeField and Description
private final OpenSslServerSessionContext

Constructor Summary

AccessConstructor and Description
public
OpenSslServerContext(File
an X.509 certificate chain file in PEM format
certChainFile
,
File
a PKCS#8 private key file in PEM format
keyFile
)

Deprecated use SslContextBuilder
Creates a new instance.
public
OpenSslServerContext(File
an X.509 certificate chain file in PEM format
certChainFile
,
File
a PKCS#8 private key file in PEM format
keyFile
,
String
the password of the keyFile. null if it's not password-protected.
keyPassword
)

Deprecated use SslContextBuilder
Creates a new instance.
public
OpenSslServerContext(File
an X.509 certificate chain file in PEM format
certChainFile
,
File
a PKCS#8 private key file in PEM format
keyFile
,
String
the password of the keyFile. null if it's not password-protected.
keyPassword
,
Iterable<String>
the cipher suites to enable, in the order of preference. null to use the default cipher suites.
ciphers
,
ApplicationProtocolConfig
Provides a means to configure parameters related to application protocol negotiation.
apn
,
long
the size of the cache used for storing SSL session objects. 0 to use the default value.
sessionCacheSize
,
long
the timeout for the cached SSL session objects, in seconds. 0 to use the default value.
sessionTimeout
)

Deprecated use SslContextBuilder
Creates a new instance.
public
OpenSslServerContext(File
an X.509 certificate chain file in PEM format
certChainFile
,
File
a PKCS#8 private key file in PEM format
keyFile
,
String
the password of the keyFile. null if it's not password-protected.
keyPassword
,
Iterable<String>
the cipher suites to enable, in the order of preference. null to use the default cipher suites.
ciphers
,
Iterable<String>
the application layer protocols to accept, in the order of preference. null to disable TLS NPN/ALPN extension.
nextProtocols
,
long
the size of the cache used for storing SSL session objects. 0 to use the default value.
sessionCacheSize
,
long
the timeout for the cached SSL session objects, in seconds. 0 to use the default value.
sessionTimeout
)

Deprecated use SslContextBuilder
Creates a new instance.
public
OpenSslServerContext(File
an X.509 certificate chain file in PEM format
certChainFile
,
File
a PKCS#8 private key file in PEM format
keyFile
,
String
the password of the keyFile. null if it's not password-protected.
keyPassword
,
TrustManagerFactory trustManagerFactory, Iterable<String>
the cipher suites to enable, in the order of preference. null to use the default cipher suites.
ciphers
,
ApplicationProtocolConfig
Application protocol config.
config
,
long
the size of the cache used for storing SSL session objects. 0 to use the default value.
sessionCacheSize
,
long
the timeout for the cached SSL session objects, in seconds. 0 to use the default value.
sessionTimeout
)

Deprecated use SslContextBuilder
Creates a new instance.
public
OpenSslServerContext(File
an X.509 certificate chain file in PEM format
certChainFile
,
File
a PKCS#8 private key file in PEM format
keyFile
,
String
the password of the keyFile. null if it's not password-protected.
keyPassword
,
TrustManagerFactory trustManagerFactory, Iterable<String>
the cipher suites to enable, in the order of preference. null to use the default cipher suites.
ciphers
,
OpenSslApplicationProtocolNegotiator
Application protocol negotiator.
apn
,
long
the size of the cache used for storing SSL session objects. 0 to use the default value.
sessionCacheSize
,
long
the timeout for the cached SSL session objects, in seconds. 0 to use the default value.
sessionTimeout
)

Deprecated use SslContextBuilder
Creates a new instance.
public
OpenSslServerContext(File
an X.509 certificate chain file in PEM format
certChainFile
,
File
a PKCS#8 private key file in PEM format
keyFile
,
String
the password of the keyFile. null if it's not password-protected.
keyPassword
,
Iterable<String>
the cipher suites to enable, in the order of preference. null to use the default cipher suites.
ciphers
,
CipherSuiteFilter
a filter to apply over the supplied list of ciphers
cipherFilter
,
ApplicationProtocolConfig
Provides a means to configure parameters related to application protocol negotiation.
apn
,
long
the size of the cache used for storing SSL session objects. 0 to use the default value.
sessionCacheSize
,
long
the timeout for the cached SSL session objects, in seconds. 0 to use the default value.
sessionTimeout
)

Deprecated use SslContextBuilder
Creates a new instance.
public
OpenSslServerContext(File
an X.509 certificate collection file in PEM format. This provides the certificate collection used for mutual authentication. null to use the system default
trustCertCollectionFile
,
TrustManagerFactory
the TrustManagerFactory that provides the TrustManagers that verifies the certificates sent from clients. null to use the default or the results of parsing trustCertCollectionFile.
trustManagerFactory
,
File
an X.509 certificate chain file in PEM format
keyCertChainFile
,
File
a PKCS#8 private key file in PEM format
keyFile
,
String
the password of the keyFile. null if it's not password-protected.
keyPassword
,
KeyManagerFactory
the KeyManagerFactory that provides the KeyManagers that is used to encrypt data being sent to clients. null to use the default or the results of parsing keyCertChainFile and keyFile.
keyManagerFactory
,
Iterable<String>
the cipher suites to enable, in the order of preference. null to use the default cipher suites.
ciphers
,
CipherSuiteFilter
a filter to apply over the supplied list of ciphers Only required if provider is SslProvider#JDK
cipherFilter
,
ApplicationProtocolConfig
Provides a means to configure parameters related to application protocol negotiation.
config
,
long
the size of the cache used for storing SSL session objects. 0 to use the default value.
sessionCacheSize
,
long
the timeout for the cached SSL session objects, in seconds. 0 to use the default value.
sessionTimeout
)

Deprecated use SslContextBuilder
Creates a new instance.
public
OpenSslServerContext(File
an X.509 certificate chain file in PEM format
certChainFile
,
File
a PKCS#8 private key file in PEM format
keyFile
,
String
the password of the keyFile. null if it's not password-protected.
keyPassword
,
TrustManagerFactory trustManagerFactory, Iterable<String>
the cipher suites to enable, in the order of preference. null to use the default cipher suites.
ciphers
,
CipherSuiteFilter
a filter to apply over the supplied list of ciphers
cipherFilter
,
ApplicationProtocolConfig
Application protocol config.
config
,
long
the size of the cache used for storing SSL session objects. 0 to use the default value.
sessionCacheSize
,
long
the timeout for the cached SSL session objects, in seconds. 0 to use the default value.
sessionTimeout
)

Deprecated use SslContextBuilder
Creates a new instance.
public
OpenSslServerContext(File
an X.509 certificate chain file in PEM format
certChainFile
,
File
a PKCS#8 private key file in PEM format
keyFile
,
String
the password of the keyFile. null if it's not password-protected.
keyPassword
,
TrustManagerFactory trustManagerFactory, Iterable<String>
the cipher suites to enable, in the order of preference. null to use the default cipher suites.
ciphers
,
CipherSuiteFilter
a filter to apply over the supplied list of ciphers
cipherFilter
,
OpenSslApplicationProtocolNegotiator
Application protocol negotiator.
apn
,
long
the size of the cache used for storing SSL session objects. 0 to use the default value.
sessionCacheSize
,
long
the timeout for the cached SSL session objects, in seconds. 0 to use the default value.
sessionTimeout
)

Deprecated use SslContextBuilder}
Creates a new instance.
public
OpenSslServerContext(File
an X.509 certificate collection file in PEM format. This provides the certificate collection used for mutual authentication. null to use the system default
trustCertCollectionFile
,
TrustManagerFactory
the TrustManagerFactory that provides the TrustManagers that verifies the certificates sent from clients. null to use the default or the results of parsing trustCertCollectionFile.
trustManagerFactory
,
File
an X.509 certificate chain file in PEM format
keyCertChainFile
,
File
a PKCS#8 private key file in PEM format
keyFile
,
String
the password of the keyFile. null if it's not password-protected.
keyPassword
,
KeyManagerFactory
the KeyManagerFactory that provides the KeyManagers that is used to encrypt data being sent to clients. null to use the default or the results of parsing keyCertChainFile and keyFile.
keyManagerFactory
,
Iterable<String>
the cipher suites to enable, in the order of preference. null to use the default cipher suites.
ciphers
,
CipherSuiteFilter
a filter to apply over the supplied list of ciphers Only required if provider is SslProvider#JDK
cipherFilter
,
OpenSslApplicationProtocolNegotiator
Application Protocol Negotiator object
apn
,
long
the size of the cache used for storing SSL session objects. 0 to use the default value.
sessionCacheSize
,
long
the timeout for the cached SSL session objects, in seconds. 0 to use the default value.
sessionTimeout
)

Deprecated use SslContextBuilder
Creates a new instance.
pack-priv
OpenSslServerContext(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)

private
OpenSslServerContext(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
public OpenSslServerSessionContext
sessionContext()

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

Returns the SSLSessionContext object held by this context.
Inherited from io.netty.handler.ssl.OpenSslContext:
finalizenewEngine0

Field Detail

sessionContextback to summary
private final OpenSslServerSessionContext sessionContext

Constructor Detail

OpenSslServerContextback to summary
public OpenSslServerContext(File certChainFile, File keyFile) throws SSLException

Deprecated

use SslContextBuilder

Creates a new instance.

Parameters
certChainFile:File

an X.509 certificate chain file in PEM format

keyFile:File

a PKCS#8 private key file in PEM format

Annotations
@Deprecated
OpenSslServerContextback to summary
public OpenSslServerContext(File certChainFile, File keyFile, String keyPassword) throws SSLException

Deprecated

use SslContextBuilder

Creates a new instance.

Parameters
certChainFile:File

an X.509 certificate chain file in PEM format

keyFile:File

a PKCS#8 private key file in PEM format

keyPassword:String

the password of the keyFile. null if it's not password-protected.

Annotations
@Deprecated
OpenSslServerContextback to summary
public OpenSslServerContext(File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout) throws SSLException

Deprecated

use SslContextBuilder

Creates a new instance.

Parameters
certChainFile:File

an X.509 certificate chain file in PEM format

keyFile:File

a PKCS#8 private key file in PEM format

keyPassword:String

the password of the keyFile. null if it's not password-protected.

ciphers:Iterable<String>

the cipher suites to enable, in the order of preference. null to use the default cipher suites.

apn:ApplicationProtocolConfig

Provides a means to configure parameters related to application protocol negotiation.

sessionCacheSize:long

the size of the cache used for storing SSL session objects. 0 to use the default value.

sessionTimeout:long

the timeout for the cached SSL session objects, in seconds. 0 to use the default value.

Annotations
@Deprecated
OpenSslServerContextback to summary
public OpenSslServerContext(File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, Iterable<String> nextProtocols, long sessionCacheSize, long sessionTimeout) throws SSLException

Deprecated

use SslContextBuilder

Creates a new instance.

Parameters
certChainFile:File

an X.509 certificate chain file in PEM format

keyFile:File

a PKCS#8 private key file in PEM format

keyPassword:String

the password of the keyFile. null if it's not password-protected.

ciphers:Iterable<String>

the cipher suites to enable, in the order of preference. null to use the default cipher suites.

nextProtocols:Iterable<String>

the application layer protocols to accept, in the order of preference. null to disable TLS NPN/ALPN extension.

sessionCacheSize:long

the size of the cache used for storing SSL session objects. 0 to use the default value.

sessionTimeout:long

the timeout for the cached SSL session objects, in seconds. 0 to use the default value.

Annotations
@Deprecated
OpenSslServerContextback to summary
public OpenSslServerContext(File certChainFile, File keyFile, String keyPassword, TrustManagerFactory trustManagerFactory, Iterable<String> ciphers, ApplicationProtocolConfig config, long sessionCacheSize, long sessionTimeout) throws SSLException

Deprecated

use SslContextBuilder

Creates a new instance.

Parameters
certChainFile:File

an X.509 certificate chain file in PEM format

keyFile:File

a PKCS#8 private key file in PEM format

keyPassword:String

the password of the keyFile. null if it's not password-protected.

ciphers:Iterable<String>

the cipher suites to enable, in the order of preference. null to use the default cipher suites.

config:ApplicationProtocolConfig

Application protocol config.

sessionCacheSize:long

the size of the cache used for storing SSL session objects. 0 to use the default value.

sessionTimeout:long

the timeout for the cached SSL session objects, in seconds. 0 to use the default value.

Annotations
@Deprecated
OpenSslServerContextback to summary
public OpenSslServerContext(File certChainFile, File keyFile, String keyPassword, TrustManagerFactory trustManagerFactory, Iterable<String> ciphers, OpenSslApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout) throws SSLException

Deprecated

use SslContextBuilder

Creates a new instance.

Parameters
certChainFile:File

an X.509 certificate chain file in PEM format

keyFile:File

a PKCS#8 private key file in PEM format

keyPassword:String

the password of the keyFile. null if it's not password-protected.

ciphers:Iterable<String>

the cipher suites to enable, in the order of preference. null to use the default cipher suites.

apn:OpenSslApplicationProtocolNegotiator

Application protocol negotiator.

sessionCacheSize:long

the size of the cache used for storing SSL session objects. 0 to use the default value.

sessionTimeout:long

the timeout for the cached SSL session objects, in seconds. 0 to use the default value.

Annotations
@Deprecated
OpenSslServerContextback to summary
public OpenSslServerContext(File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout) throws SSLException

Deprecated

use SslContextBuilder

Creates a new instance.

Parameters
certChainFile:File

an X.509 certificate chain file in PEM format

keyFile:File

a PKCS#8 private key file in PEM format

keyPassword:String

the password of the keyFile. null if it's not password-protected.

ciphers:Iterable<String>

the cipher suites to enable, in the order of preference. null to use the default cipher suites.

cipherFilter:CipherSuiteFilter

a filter to apply over the supplied list of ciphers

apn:ApplicationProtocolConfig

Provides a means to configure parameters related to application protocol negotiation.

sessionCacheSize:long

the size of the cache used for storing SSL session objects. 0 to use the default value.

sessionTimeout:long

the timeout for the cached SSL session objects, in seconds. 0 to use the default value.

Annotations
@Deprecated
OpenSslServerContextback to summary
public OpenSslServerContext(File trustCertCollectionFile, TrustManagerFactory trustManagerFactory, File keyCertChainFile, File keyFile, String keyPassword, KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig config, long sessionCacheSize, long sessionTimeout) throws SSLException

Deprecated

use SslContextBuilder

Creates a new instance.

Parameters
trustCertCollectionFile:File

an X.509 certificate collection file in PEM format. This provides the certificate collection used for mutual authentication. null to use the system default

trustManagerFactory:TrustManagerFactory

the TrustManagerFactory that provides the TrustManagers that verifies the certificates sent from clients. null to use the default or the results of parsing trustCertCollectionFile.

keyCertChainFile:File

an X.509 certificate chain file in PEM format

keyFile:File

a PKCS#8 private key file in PEM format

keyPassword:String

the password of the keyFile. null if it's not password-protected.

keyManagerFactory:KeyManagerFactory

the KeyManagerFactory that provides the KeyManagers that is used to encrypt data being sent to clients. null to use the default or the results of parsing keyCertChainFile and keyFile.

ciphers:Iterable<String>

the cipher suites to enable, in the order of preference. null to use the default cipher suites.

cipherFilter:CipherSuiteFilter

a filter to apply over the supplied list of ciphers Only required if provider is SslProvider#JDK

config:ApplicationProtocolConfig

Provides a means to configure parameters related to application protocol negotiation.

sessionCacheSize:long

the size of the cache used for storing SSL session objects. 0 to use the default value.

sessionTimeout:long

the timeout for the cached SSL session objects, in seconds. 0 to use the default value.

Annotations
@Deprecated
OpenSslServerContextback to summary
public OpenSslServerContext(File certChainFile, File keyFile, String keyPassword, TrustManagerFactory trustManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig config, long sessionCacheSize, long sessionTimeout) throws SSLException

Deprecated

use SslContextBuilder

Creates a new instance.

Parameters
certChainFile:File

an X.509 certificate chain file in PEM format

keyFile:File

a PKCS#8 private key file in PEM format

keyPassword:String

the password of the keyFile. null if it's not password-protected.

ciphers:Iterable<String>

the cipher suites to enable, in the order of preference. null to use the default cipher suites.

cipherFilter:CipherSuiteFilter

a filter to apply over the supplied list of ciphers

config:ApplicationProtocolConfig

Application protocol config.

sessionCacheSize:long

the size of the cache used for storing SSL session objects. 0 to use the default value.

sessionTimeout:long

the timeout for the cached SSL session objects, in seconds. 0 to use the default value.

Annotations
@Deprecated
OpenSslServerContextback to summary
public OpenSslServerContext(File certChainFile, File keyFile, String keyPassword, TrustManagerFactory trustManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, OpenSslApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout) throws SSLException

Deprecated

use SslContextBuilder}

Creates a new instance.

Parameters
certChainFile:File

an X.509 certificate chain file in PEM format

keyFile:File

a PKCS#8 private key file in PEM format

keyPassword:String

the password of the keyFile. null if it's not password-protected.

ciphers:Iterable<String>

the cipher suites to enable, in the order of preference. null to use the default cipher suites.

cipherFilter:CipherSuiteFilter

a filter to apply over the supplied list of ciphers

apn:OpenSslApplicationProtocolNegotiator

Application protocol negotiator.

sessionCacheSize:long

the size of the cache used for storing SSL session objects. 0 to use the default value.

sessionTimeout:long

the timeout for the cached SSL session objects, in seconds. 0 to use the default value.

Annotations
@Deprecated
OpenSslServerContextback to summary
public OpenSslServerContext(File trustCertCollectionFile, TrustManagerFactory trustManagerFactory, File keyCertChainFile, File keyFile, String keyPassword, KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, OpenSslApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout) throws SSLException

Deprecated

use SslContextBuilder

Creates a new instance.

Parameters
trustCertCollectionFile:File

an X.509 certificate collection file in PEM format. This provides the certificate collection used for mutual authentication. null to use the system default

trustManagerFactory:TrustManagerFactory

the TrustManagerFactory that provides the TrustManagers that verifies the certificates sent from clients. null to use the default or the results of parsing trustCertCollectionFile.

keyCertChainFile:File

an X.509 certificate chain file in PEM format

keyFile:File

a PKCS#8 private key file in PEM format

keyPassword:String

the password of the keyFile. null if it's not password-protected.

keyManagerFactory:KeyManagerFactory

the KeyManagerFactory that provides the KeyManagers that is used to encrypt data being sent to clients. null to use the default or the results of parsing keyCertChainFile and keyFile.

ciphers:Iterable<String>

the cipher suites to enable, in the order of preference. null to use the default cipher suites.

cipherFilter:CipherSuiteFilter

a filter to apply over the supplied list of ciphers Only required if provider is SslProvider#JDK

apn:OpenSslApplicationProtocolNegotiator

Application Protocol Negotiator object

sessionCacheSize:long

the size of the cache used for storing SSL session objects. 0 to use the default value.

sessionTimeout:long

the timeout for the cached SSL session objects, in seconds. 0 to use the default value.

Annotations
@Deprecated
OpenSslServerContextback to summary
pack-priv OpenSslServerContext(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
OpenSslServerContextback to summary
private OpenSslServerContext(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.

Annotations
@SuppressWarnings:deprecation

Method Detail

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