Package io.netty.handler.ssl
Class JdkSslServerContext
java.lang.Object
io.netty.handler.ssl.SslContext
io.netty.handler.ssl.JdkSslContext
io.netty.handler.ssl.JdkSslServerContext
Deprecated.
A server-side
SslContext
which uses JDK's SSL/TLS implementation.-
Field Summary
FieldsFields inherited from class io.netty.handler.ssl.JdkSslContext
PROTOCOL
Fields inherited from class io.netty.handler.ssl.SslContext
ALIAS, X509_CERT_FACTORY
-
Constructor Summary
ConstructorsConstructorDescriptionJdkSslServerContext
(File certChainFile, File keyFile) Deprecated.JdkSslServerContext
(File certChainFile, File keyFile, String keyPassword) Deprecated.JdkSslServerContext
(File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout) Deprecated.JdkSslServerContext
(File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, JdkApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout) Deprecated.JdkSslServerContext
(File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, Iterable<String> nextProtocols, long sessionCacheSize, long sessionTimeout) Deprecated.JdkSslServerContext
(File trustCertCollectionFile, TrustManagerFactory trustManagerFactory, File keyCertChainFile, File keyFile, String keyPassword, KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout) Deprecated.JdkSslServerContext
(File trustCertCollectionFile, TrustManagerFactory trustManagerFactory, File keyCertChainFile, File keyFile, String keyPassword, KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, JdkApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout) Deprecated.JdkSslServerContext
(Provider provider, File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, JdkApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout, String keyStore) Deprecated.JdkSslServerContext
(Provider provider, 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, String keyStore) Deprecated. -
Method Summary
Modifier and TypeMethodDescription(package private) static void
Deprecated.private static SSLContext
newSSLContext
(Provider sslContextProvider, X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory, X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, KeyManagerFactory keyManagerFactory, long sessionCacheSize, long sessionTimeout, String keyStore) Deprecated.private static TrustManager[]
wrapTrustManagerIfNeeded
(TrustManager[] trustManagers) Deprecated.Methods inherited from class io.netty.handler.ssl.JdkSslContext
applicationProtocolNegotiator, buildKeyManagerFactory, buildKeyManagerFactory, buildKeyManagerFactory, buildKeyManagerFactory, cipherSuites, context, isClient, newEngine, newEngine, sessionContext, toNegotiator
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, 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
-
WRAP_TRUST_MANAGER
private static final boolean WRAP_TRUST_MANAGERDeprecated.
-
-
Constructor Details
-
JdkSslServerContext
Deprecated.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:
SSLException
-
JdkSslServerContext
@Deprecated public JdkSslServerContext(File certChainFile, File keyFile, String keyPassword) throws SSLException Deprecated.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
.null
if it's not password-protected.- Throws:
SSLException
-
JdkSslServerContext
@Deprecated public JdkSslServerContext(File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, Iterable<String> nextProtocols, long sessionCacheSize, long sessionTimeout) throws SSLException Deprecated.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
.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.nextProtocols
- the application layer protocols to accept, in the order of preference.null
to disable TLS NPN/ALPN extension.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.- Throws:
SSLException
-
JdkSslServerContext
@Deprecated public JdkSslServerContext(File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout) throws SSLException Deprecated.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
.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.- Throws:
SSLException
-
JdkSslServerContext
@Deprecated public JdkSslServerContext(File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, JdkApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout) throws SSLException Deprecated.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
.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.- Throws:
SSLException
-
JdkSslServerContext
JdkSslServerContext(Provider provider, File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, JdkApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout, String keyStore) throws SSLException Deprecated.- Throws:
SSLException
-
JdkSslServerContext
@Deprecated public JdkSslServerContext(File trustCertCollectionFile, TrustManagerFactory trustManagerFactory, File keyCertChainFile, File keyFile, String keyPassword, KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout) throws SSLException Deprecated.Creates a new instance.- Parameters:
trustCertCollectionFile
- an X.509 certificate collection file in PEM format. This provides the certificate collection used for mutual authentication.null
to use the system defaulttrustManagerFactory
- theTrustManagerFactory
that provides theTrustManager
s that verifies the certificates sent from clients.null
to 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
.null
if it's not password-protected.keyManagerFactory
- theKeyManagerFactory
that provides theKeyManager
s that is used to encrypt data being sent to clients.null
to use the default or the results of parsingkeyCertChainFile
andkeyFile
.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 ifprovider
isSslProvider.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.- Throws:
SSLException
-
JdkSslServerContext
@Deprecated public JdkSslServerContext(File trustCertCollectionFile, TrustManagerFactory trustManagerFactory, File keyCertChainFile, File keyFile, String keyPassword, KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, JdkApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout) throws SSLException Deprecated.Creates a new instance.- Parameters:
trustCertCollectionFile
- an X.509 certificate collection file in PEM format. This provides the certificate collection used for mutual authentication.null
to use the system defaulttrustManagerFactory
- theTrustManagerFactory
that provides theTrustManager
s that verifies the certificates sent from clients.null
to 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
.null
if it's not password-protected.keyManagerFactory
- theKeyManagerFactory
that provides theKeyManager
s that is used to encrypt data being sent to clients.null
to use the default or the results of parsingkeyCertChainFile
andkeyFile
.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 ifprovider
isSslProvider.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- Throws:
SSLException
-
JdkSslServerContext
JdkSslServerContext(Provider provider, 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, String keyStore) throws SSLException Deprecated.- Throws:
SSLException
-
-
Method Details
-
checkIfWrappingTrustManagerIsSupported
static void checkIfWrappingTrustManagerIsSupported() throws CertificateException, InvalidAlgorithmParameterException, NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeySpecException, IOException, KeyException, KeyStoreException, UnrecoverableKeyExceptionDeprecated. -
newSSLContext
private static SSLContext newSSLContext(Provider sslContextProvider, X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory, X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, KeyManagerFactory keyManagerFactory, long sessionCacheSize, long sessionTimeout, String keyStore) throws SSLException Deprecated.- Throws:
SSLException
-
wrapTrustManagerIfNeeded
Deprecated.
-
SslContextBuilder
to createJdkSslContext
instances and only useJdkSslContext
in your code.