Package org.conscrypt

Class SSLContextImpl

java.lang.Object
javax.net.ssl.SSLContextSpi
org.conscrypt.SSLContextImpl
Direct Known Subclasses:
OpenSSLContextImpl

public class SSLContextImpl
extends SSLContextSpi
Implementation of SSLContext service provider interface.
  • Field Details

  • Constructor Details

  • Method Details

    • engineInit

      public void engineInit​(KeyManager[] kms, TrustManager[] tms, SecureRandom sr) throws KeyManagementException
      Initializes this SSLContext instance. All of the arguments are optional, and the security providers will be searched for the required implementations of the needed algorithms.
      Specified by:
      engineInit in class SSLContextSpi
      Parameters:
      kms - the key sources or null
      tms - the trust decision sources or null
      sr - the randomness source or null
      Throws:
      KeyManagementException - if initializing this instance fails
    • engineGetSocketFactory

      public SSLSocketFactory engineGetSocketFactory()
      Description copied from class: SSLContextSpi
      Returns a socket factory for this instance.
      Specified by:
      engineGetSocketFactory in class SSLContextSpi
      Returns:
      a socket factory for this instance.
    • engineGetServerSocketFactory

      public SSLServerSocketFactory engineGetServerSocketFactory()
      Description copied from class: SSLContextSpi
      Returns a server socket factory for this instance.
      Specified by:
      engineGetServerSocketFactory in class SSLContextSpi
      Returns:
      a server socket factory for this instance.
    • engineCreateSSLEngine

      public SSLEngine engineCreateSSLEngine​(String host, int port)
      Description copied from class: SSLContextSpi
      Creates an SSLEngine instance from this context with the specified hostname and port.
      Specified by:
      engineCreateSSLEngine in class SSLContextSpi
      Parameters:
      host - the name of the host
      port - the port
      Returns:
      an SSLEngine instance from this context.
    • engineCreateSSLEngine

      public SSLEngine engineCreateSSLEngine()
      Description copied from class: SSLContextSpi
      Creates an SSLEngine instance from this context.
      Specified by:
      engineCreateSSLEngine in class SSLContextSpi
      Returns:
      an SSLEngine instance from this context.
    • engineGetServerSessionContext

      public ServerSessionContext engineGetServerSessionContext()
      Description copied from class: SSLContextSpi
      Returns the SSL session context that encapsulates the set of SSL sessions that can be used for the server side of the SSL handshake.
      Specified by:
      engineGetServerSessionContext in class SSLContextSpi
      Returns:
      the SSL server session context for this context or null if the underlying provider does not provide an implementation of the SSLSessionContext interface.
    • engineGetClientSessionContext

      public ClientSessionContext engineGetClientSessionContext()
      Description copied from class: SSLContextSpi
      Returns the SSL session context that encapsulates the set of SSL sessions that can be used for the client side of the SSL handshake.
      Specified by:
      engineGetClientSessionContext in class SSLContextSpi
      Returns:
      the SSL client session context for this context or null if the underlying provider does not provide an implementation of the SSLSessionContext interface.