Package org.conscrypt

Class OpenSSLSocketFactoryImpl


  • final class OpenSSLSocketFactoryImpl
    extends javax.net.ssl.SSLSocketFactory
    An implementation of SSLSocketFactory based on BoringSSL.

    This name of this class cannot change in order to maintain backward-compatibility with GMS core ProviderInstallerImpl

    • Field Detail

      • useEngineSocketByDefault

        private static boolean useEngineSocketByDefault
      • instantiationException

        private final java.io.IOException instantiationException
      • useEngineSocket

        private boolean useEngineSocket
    • Constructor Detail

      • OpenSSLSocketFactoryImpl

        OpenSSLSocketFactoryImpl()
      • OpenSSLSocketFactoryImpl

        OpenSSLSocketFactoryImpl​(SSLParametersImpl sslParameters)
    • Method Detail

      • setUseEngineSocketByDefault

        static void setUseEngineSocketByDefault​(boolean useEngineSocket)
        Configures the default socket type to be created for the default and all new instances.
      • setUseEngineSocket

        void setUseEngineSocket​(boolean useEngineSocket)
        Configures the socket to be created for this instance. If not called, useEngineSocketByDefault will be used.
      • getDefaultCipherSuites

        public java.lang.String[] getDefaultCipherSuites()
        Specified by:
        getDefaultCipherSuites in class javax.net.ssl.SSLSocketFactory
      • getSupportedCipherSuites

        public java.lang.String[] getSupportedCipherSuites()
        Specified by:
        getSupportedCipherSuites in class javax.net.ssl.SSLSocketFactory
      • createSocket

        public java.net.Socket createSocket()
                                     throws java.io.IOException
        Overrides:
        createSocket in class javax.net.SocketFactory
        Throws:
        java.io.IOException
      • createSocket

        public java.net.Socket createSocket​(java.lang.String hostname,
                                            int port)
                                     throws java.io.IOException,
                                            java.net.UnknownHostException
        Specified by:
        createSocket in class javax.net.SocketFactory
        Throws:
        java.io.IOException
        java.net.UnknownHostException
      • createSocket

        public java.net.Socket createSocket​(java.lang.String hostname,
                                            int port,
                                            java.net.InetAddress localHost,
                                            int localPort)
                                     throws java.io.IOException,
                                            java.net.UnknownHostException
        Specified by:
        createSocket in class javax.net.SocketFactory
        Throws:
        java.io.IOException
        java.net.UnknownHostException
      • createSocket

        public java.net.Socket createSocket​(java.net.InetAddress address,
                                            int port)
                                     throws java.io.IOException
        Specified by:
        createSocket in class javax.net.SocketFactory
        Throws:
        java.io.IOException
      • createSocket

        public java.net.Socket createSocket​(java.net.InetAddress address,
                                            int port,
                                            java.net.InetAddress localAddress,
                                            int localPort)
                                     throws java.io.IOException
        Specified by:
        createSocket in class javax.net.SocketFactory
        Throws:
        java.io.IOException
      • createSocket

        public java.net.Socket createSocket​(java.net.Socket socket,
                                            java.lang.String hostname,
                                            int port,
                                            boolean autoClose)
                                     throws java.io.IOException
        Specified by:
        createSocket in class javax.net.ssl.SSLSocketFactory
        Throws:
        java.io.IOException
      • hasFileDescriptor

        private boolean hasFileDescriptor​(java.net.Socket s)