public final class JdkSslServerContext extends JdkSslContext
SslContext
which uses JDK's SSL/TLS implementation.Constructor and Description |
---|
JdkSslServerContext(File certChainFile,
File keyFile)
Creates a new instance.
|
JdkSslServerContext(File certChainFile,
File keyFile,
String keyPassword)
Creates a new instance.
|
JdkSslServerContext(File certChainFile,
File keyFile,
String keyPassword,
Iterable<String> ciphers,
CipherSuiteFilter cipherFilter,
ApplicationProtocolConfig apn,
long sessionCacheSize,
long sessionTimeout)
Creates a new instance.
|
JdkSslServerContext(File certChainFile,
File keyFile,
String keyPassword,
Iterable<String> ciphers,
CipherSuiteFilter cipherFilter,
JdkApplicationProtocolNegotiator apn,
long sessionCacheSize,
long sessionTimeout)
Creates a new instance.
|
JdkSslServerContext(File trustCertChainFile,
TrustManagerFactory trustManagerFactory,
File keyCertChainFile,
File keyFile,
String keyPassword,
KeyManagerFactory keyManagerFactory,
Iterable<String> ciphers,
CipherSuiteFilter cipherFilter,
ApplicationProtocolConfig apn,
long sessionCacheSize,
long sessionTimeout)
Creates a new instance.
|
JdkSslServerContext(File trustCertChainFile,
TrustManagerFactory trustManagerFactory,
File keyCertChainFile,
File keyFile,
String keyPassword,
KeyManagerFactory keyManagerFactory,
Iterable<String> ciphers,
CipherSuiteFilter cipherFilter,
JdkApplicationProtocolNegotiator apn,
long sessionCacheSize,
long sessionTimeout)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
SSLContext |
context()
Returns the JDK
SSLContext object held by this context. |
boolean |
isClient()
Returns the
true if and only if this context is for client-side. |
applicationProtocolNegotiator, buildKeyManagerFactory, buildKeyManagerFactory, buildTrustManagerFactory, cipherSuites, newEngine, newEngine, sessionCacheSize, sessionContext, sessionTimeout
defaultClientProvider, defaultServerProvider, generateKeySpec, isServer, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newHandler, newHandler, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext
public JdkSslServerContext(File certChainFile, File keyFile) throws SSLException
certChainFile
- an X.509 certificate chain file in PEM formatkeyFile
- a PKCS#8 private key file in PEM formatSSLException
public JdkSslServerContext(File certChainFile, File keyFile, String keyPassword) throws SSLException
certChainFile
- an X.509 certificate chain file in PEM formatkeyFile
- a PKCS#8 private key file in PEM formatkeyPassword
- the password of the keyFile
.
null
if it's not password-protected.SSLException
public JdkSslServerContext(File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout) throws SSLException
certChainFile
- an X.509 certificate chain file in PEM formatkeyFile
- a PKCS#8 private key file in PEM formatkeyPassword
- the password of the keyFile
.
null
if it's not password-protected.ciphers
- the cipher suites to enable, in the order of preference.
null
to 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.
0
to use the default value.sessionTimeout
- the timeout for the cached SSL session objects, in seconds.
0
to use the default value.SSLException
public JdkSslServerContext(File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, JdkApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout) throws SSLException
certChainFile
- an X.509 certificate chain file in PEM formatkeyFile
- a PKCS#8 private key file in PEM formatkeyPassword
- the password of the keyFile
.
null
if it's not password-protected.ciphers
- the cipher suites to enable, in the order of preference.
null
to use the default cipher suites.cipherFilter
- a filter to apply over the supplied list of ciphersapn
- Application Protocol Negotiator object.sessionCacheSize
- the size of the cache used for storing SSL session objects.
0
to use the default value.sessionTimeout
- the timeout for the cached SSL session objects, in seconds.
0
to use the default value.SSLException
public JdkSslServerContext(File trustCertChainFile, TrustManagerFactory trustManagerFactory, File keyCertChainFile, File keyFile, String keyPassword, KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout) throws SSLException
trustCertChainFile
- an X.509 certificate chain file in PEM format.
This provides the certificate chains used for mutual authentication.
null
to use the system defaulttrustManagerFactory
- the TrustManagerFactory
that provides the TrustManager
s
that verifies the certificates sent from clients.
null
to use the default or the results of parsing trustCertChainFile
.keyCertChainFile
- an X.509 certificate chain file in PEM formatkeyFile
- a PKCS#8 private key file in PEM formatkeyPassword
- the password of the keyFile
.
null
if it's not password-protected.keyManagerFactory
- the KeyManagerFactory
that provides the KeyManager
s
that is used to encrypt data being sent to clients.
null
to use the default or the results of parsing
keyCertChainFile
and keyFile
.ciphers
- the cipher suites to enable, in the order of preference.
null
to use the default cipher suites.cipherFilter
- a filter to apply over the supplied list of ciphers
Only required if provider
is SslProvider.JDK
apn
- Provides a means to configure parameters related to application protocol negotiation.sessionCacheSize
- the size of the cache used for storing SSL session objects.
0
to use the default value.sessionTimeout
- the timeout for the cached SSL session objects, in seconds.
0
to use the default value.SSLException
public JdkSslServerContext(File trustCertChainFile, TrustManagerFactory trustManagerFactory, File keyCertChainFile, File keyFile, String keyPassword, KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, JdkApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout) throws SSLException
trustCertChainFile
- an X.509 certificate chain file in PEM format.
This provides the certificate chains used for mutual authentication.
null
to use the system defaulttrustManagerFactory
- the TrustManagerFactory
that provides the TrustManager
s
that verifies the certificates sent from clients.
null
to use the default or the results of parsing trustCertChainFile
keyCertChainFile
- an X.509 certificate chain file in PEM formatkeyFile
- a PKCS#8 private key file in PEM formatkeyPassword
- the password of the keyFile
.
null
if it's not password-protected.keyManagerFactory
- the KeyManagerFactory
that provides the KeyManager
s
that is used to encrypt data being sent to clients.
null
to use the default or the results of parsing
keyCertChainFile
and keyFile
.ciphers
- the cipher suites to enable, in the order of preference.
null
to use the default cipher suites.cipherFilter
- a filter to apply over the supplied list of ciphers
Only required if provider
is SslProvider.JDK
apn
- Application Protocol Negotiator object.sessionCacheSize
- the size of the cache used for storing SSL session objects.
0
to use the default value.sessionTimeout
- the timeout for the cached SSL session objects, in seconds.
0
to use the default value.SSLException
public boolean isClient()
SslContext
true
if and only if this context is for client-side.isClient
in class SslContext
public SSLContext context()
JdkSslContext
SSLContext
object held by this context.context
in class JdkSslContext
Copyright © 2008–2015 The Netty Project. All rights reserved.