Package org.conscrypt

Class OpenSSLContextImpl

    • Field Detail

      • defaultSslContextImpl

        private static DefaultSSLContextImpl defaultSslContextImpl
        The default SSLContextImpl for use with SSLContext.getInstance("Default"). Protected by the DefaultSSLContextImpl.class monitor.
      • protocols

        private final java.lang.String[] protocols
        TLS protocols to enable by default.
      • clientSessionContext

        private final ClientSessionContext clientSessionContext
        Client session cache.
      • serverSessionContext

        private final ServerSessionContext serverSessionContext
        Server session cache.
    • Constructor Detail

      • OpenSSLContextImpl

        OpenSSLContextImpl​(java.lang.String[] protocols)
      • OpenSSLContextImpl

        OpenSSLContextImpl​(java.lang.String[] protocols,
                           boolean unused)
                    throws java.security.GeneralSecurityException,
                           java.io.IOException
        Constuctor for the DefaultSSLContextImpl. The unused boolean parameter is solely to indicate that this constructor is desired.
        Throws:
        java.security.GeneralSecurityException
        java.io.IOException
    • Method Detail

      • getPreferred

        static OpenSSLContextImpl getPreferred()
        Allows outside callers to get the preferred SSLContext.
      • engineInit

        public void engineInit​(javax.net.ssl.KeyManager[] kms,
                               javax.net.ssl.TrustManager[] tms,
                               java.security.SecureRandom sr)
                        throws java.security.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 javax.net.ssl.SSLContextSpi
        Parameters:
        kms - the key sources or null
        tms - the trust decision sources or null
        sr - the randomness source or null
        Throws:
        java.security.KeyManagementException - if initializing this instance fails
      • engineGetSocketFactory

        public javax.net.ssl.SSLSocketFactory engineGetSocketFactory()
        Specified by:
        engineGetSocketFactory in class javax.net.ssl.SSLContextSpi
      • engineGetServerSocketFactory

        public javax.net.ssl.SSLServerSocketFactory engineGetServerSocketFactory()
        Specified by:
        engineGetServerSocketFactory in class javax.net.ssl.SSLContextSpi
      • engineCreateSSLEngine

        public javax.net.ssl.SSLEngine engineCreateSSLEngine​(java.lang.String host,
                                                             int port)
        Specified by:
        engineCreateSSLEngine in class javax.net.ssl.SSLContextSpi
      • engineCreateSSLEngine

        public javax.net.ssl.SSLEngine engineCreateSSLEngine()
        Specified by:
        engineCreateSSLEngine in class javax.net.ssl.SSLContextSpi
      • engineGetServerSessionContext

        public javax.net.ssl.SSLSessionContext engineGetServerSessionContext()
        Specified by:
        engineGetServerSessionContext in class javax.net.ssl.SSLContextSpi
      • engineGetClientSessionContext

        public javax.net.ssl.SSLSessionContext engineGetClientSessionContext()
        Specified by:
        engineGetClientSessionContext in class javax.net.ssl.SSLContextSpi