Package org.conscrypt

Class ConscryptServerSocket

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    final class ConscryptServerSocket
    extends javax.net.ssl.SSLServerSocket
    BoringSSL-based implementation of server sockets.
    • Field Detail

      • channelIdEnabled

        private boolean channelIdEnabled
      • useEngineSocket

        private boolean useEngineSocket
    • Constructor Detail

      • ConscryptServerSocket

        ConscryptServerSocket​(SSLParametersImpl sslParameters)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • ConscryptServerSocket

        ConscryptServerSocket​(int port,
                              SSLParametersImpl sslParameters)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • ConscryptServerSocket

        ConscryptServerSocket​(int port,
                              int backlog,
                              SSLParametersImpl sslParameters)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • ConscryptServerSocket

        ConscryptServerSocket​(int port,
                              int backlog,
                              java.net.InetAddress iAddress,
                              SSLParametersImpl sslParameters)
                       throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • setUseEngineSocket

        ConscryptServerSocket setUseEngineSocket​(boolean useEngineSocket)
        Configures the socket to be created for this instance.
      • getEnableSessionCreation

        public boolean getEnableSessionCreation()
        Specified by:
        getEnableSessionCreation in class javax.net.ssl.SSLServerSocket
      • setEnableSessionCreation

        public void setEnableSessionCreation​(boolean flag)
        Specified by:
        setEnableSessionCreation in class javax.net.ssl.SSLServerSocket
      • getSupportedProtocols

        public java.lang.String[] getSupportedProtocols()
        The names of the protocols' versions that may be used on this SSL connection.
        Specified by:
        getSupportedProtocols in class javax.net.ssl.SSLServerSocket
        Returns:
        an array of protocols names
      • getEnabledProtocols

        public java.lang.String[] getEnabledProtocols()
        The names of the protocols' versions that in use on this SSL connection.
        Specified by:
        getEnabledProtocols in class javax.net.ssl.SSLServerSocket
        Returns:
        an array of protocols names
      • setEnabledProtocols

        public void setEnabledProtocols​(java.lang.String[] protocols)
        This method enables the protocols' versions listed by getSupportedProtocols().
        Specified by:
        setEnabledProtocols in class javax.net.ssl.SSLServerSocket
        Parameters:
        protocols - names of all the protocols to enable.
        Throws:
        java.lang.IllegalArgumentException - when one or more of the names in the array are not supported, or when the array is null.
      • getSupportedCipherSuites

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

        public java.lang.String[] getEnabledCipherSuites()
        Specified by:
        getEnabledCipherSuites in class javax.net.ssl.SSLServerSocket
      • setChannelIdEnabled

        void setChannelIdEnabled​(boolean enabled)
        Enables/disables the TLS Channel ID extension for this server socket.
      • isChannelIdEnabled

        boolean isChannelIdEnabled()
        Checks whether the TLS Channel ID extension is enabled for this server socket.
      • setEnabledCipherSuites

        public void setEnabledCipherSuites​(java.lang.String[] suites)
        This method enables the cipher suites listed by getSupportedCipherSuites().
        Specified by:
        setEnabledCipherSuites in class javax.net.ssl.SSLServerSocket
        Parameters:
        suites - the names of all the cipher suites to enable
        Throws:
        java.lang.IllegalArgumentException - when one or more of the ciphers in array suites are not supported, or when the array is null.
      • getWantClientAuth

        public boolean getWantClientAuth()
        Specified by:
        getWantClientAuth in class javax.net.ssl.SSLServerSocket
      • setWantClientAuth

        public void setWantClientAuth​(boolean want)
        Specified by:
        setWantClientAuth in class javax.net.ssl.SSLServerSocket
      • getNeedClientAuth

        public boolean getNeedClientAuth()
        Specified by:
        getNeedClientAuth in class javax.net.ssl.SSLServerSocket
      • setNeedClientAuth

        public void setNeedClientAuth​(boolean need)
        Specified by:
        setNeedClientAuth in class javax.net.ssl.SSLServerSocket
      • setUseClientMode

        public void setUseClientMode​(boolean mode)
        Specified by:
        setUseClientMode in class javax.net.ssl.SSLServerSocket
      • getUseClientMode

        public boolean getUseClientMode()
        Specified by:
        getUseClientMode in class javax.net.ssl.SSLServerSocket
      • accept

        public java.net.Socket accept()
                               throws java.io.IOException
        Overrides:
        accept in class java.net.ServerSocket
        Throws:
        java.io.IOException