Class JdkSslServerContext

java.lang.Object

@Deprecated public final class JdkSslServerContext extends JdkSslContext
Deprecated.
Use SslContextBuilder to create JdkSslContext instances and only use JdkSslContext in your code.
A server-side SslContext which uses JDK's SSL/TLS implementation.
  • Field Details

    • WRAP_TRUST_MANAGER

      private static final boolean WRAP_TRUST_MANAGER
      Deprecated.
  • Constructor Details

    • JdkSslServerContext

      @Deprecated public JdkSslServerContext(java.io.File certChainFile, java.io.File keyFile) throws javax.net.ssl.SSLException
      Deprecated.
      Creates a new instance.
      Parameters:
      certChainFile - an X.509 certificate chain file in PEM format
      keyFile - a PKCS#8 private key file in PEM format
      Throws:
      javax.net.ssl.SSLException
    • JdkSslServerContext

      @Deprecated public JdkSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword) throws javax.net.ssl.SSLException
      Deprecated.
      Creates a new instance.
      Parameters:
      certChainFile - an X.509 certificate chain file in PEM format
      keyFile - a PKCS#8 private key file in PEM format
      keyPassword - the password of the keyFile. null if it's not password-protected.
      Throws:
      javax.net.ssl.SSLException
    • JdkSslServerContext

      @Deprecated public JdkSslServerContext(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.SSLException
      Deprecated.
      Creates a new instance.
      Parameters:
      certChainFile - an X.509 certificate chain file in PEM format
      keyFile - a PKCS#8 private key file in PEM format
      keyPassword - 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.
      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:
      javax.net.ssl.SSLException
    • JdkSslServerContext

      @Deprecated public JdkSslServerContext(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.SSLException
      Deprecated.
      Creates a new instance.
      Parameters:
      certChainFile - an X.509 certificate chain file in PEM format
      keyFile - a PKCS#8 private key file in PEM format
      keyPassword - 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 ciphers
      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:
      javax.net.ssl.SSLException
    • JdkSslServerContext

      @Deprecated public JdkSslServerContext(java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, JdkApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout) throws javax.net.ssl.SSLException
      Deprecated.
      Creates a new instance.
      Parameters:
      certChainFile - an X.509 certificate chain file in PEM format
      keyFile - a PKCS#8 private key file in PEM format
      keyPassword - 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 ciphers
      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:
      javax.net.ssl.SSLException
    • JdkSslServerContext

      JdkSslServerContext(java.security.Provider provider, java.io.File certChainFile, java.io.File keyFile, java.lang.String keyPassword, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, JdkApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout, java.lang.String keyStore) throws javax.net.ssl.SSLException
      Deprecated.
      Throws:
      javax.net.ssl.SSLException
    • JdkSslServerContext

      @Deprecated public JdkSslServerContext(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 apn, long sessionCacheSize, long sessionTimeout) throws javax.net.ssl.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 default
      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 - an X.509 certificate chain file in PEM format
      keyFile - a PKCS#8 private key file in PEM format
      keyPassword - the password of the keyFile. null if it's not password-protected.
      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 - 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.
      Throws:
      javax.net.ssl.SSLException
    • JdkSslServerContext

      @Deprecated public JdkSslServerContext(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, JdkApplicationProtocolNegotiator apn, long sessionCacheSize, long sessionTimeout) throws javax.net.ssl.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 default
      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 - an X.509 certificate chain file in PEM format
      keyFile - a PKCS#8 private key file in PEM format
      keyPassword - the password of the keyFile. null if it's not password-protected.
      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 - 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
      Throws:
      javax.net.ssl.SSLException
    • JdkSslServerContext

      JdkSslServerContext(java.security.Provider provider, java.security.cert.X509Certificate[] trustCertCollection, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.security.cert.X509Certificate[] keyCertChain, java.security.PrivateKey key, java.lang.String keyPassword, javax.net.ssl.KeyManagerFactory keyManagerFactory, java.lang.Iterable<java.lang.String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth, java.lang.String[] protocols, boolean startTls, java.security.SecureRandom secureRandom, java.lang.String keyStore, ResumptionController resumptionController) throws javax.net.ssl.SSLException
      Deprecated.
      Throws:
      javax.net.ssl.SSLException
  • Method Details

    • checkIfWrappingTrustManagerIsSupported

      static void checkIfWrappingTrustManagerIsSupported() throws java.security.cert.CertificateException, java.security.InvalidAlgorithmParameterException, javax.crypto.NoSuchPaddingException, java.security.NoSuchAlgorithmException, java.security.spec.InvalidKeySpecException, java.io.IOException, java.security.KeyException, java.security.KeyStoreException, java.security.UnrecoverableKeyException
      Deprecated.
      Throws:
      java.security.cert.CertificateException
      java.security.InvalidAlgorithmParameterException
      javax.crypto.NoSuchPaddingException
      java.security.NoSuchAlgorithmException
      java.security.spec.InvalidKeySpecException
      java.io.IOException
      java.security.KeyException
      java.security.KeyStoreException
      java.security.UnrecoverableKeyException
    • newSSLContext

      private static javax.net.ssl.SSLContext newSSLContext(java.security.Provider sslContextProvider, java.security.cert.X509Certificate[] trustCertCollection, javax.net.ssl.TrustManagerFactory trustManagerFactory, java.security.cert.X509Certificate[] keyCertChain, java.security.PrivateKey key, java.lang.String keyPassword, javax.net.ssl.KeyManagerFactory keyManagerFactory, long sessionCacheSize, long sessionTimeout, java.security.SecureRandom secureRandom, java.lang.String keyStore, ResumptionController resumptionController) throws javax.net.ssl.SSLException
      Deprecated.
      Throws:
      javax.net.ssl.SSLException
    • wrapTrustManagerIfNeeded

      private static javax.net.ssl.TrustManager[] wrapTrustManagerIfNeeded(javax.net.ssl.TrustManager[] trustManagers, ResumptionController resumptionController)
      Deprecated.