Example #1
0
        public override Java.Net.Socket CreateSocket(Java.Net.Socket s, string host, int port, bool autoClose)
        {
            SSLSocket socket = (SSLSocket)factory.CreateSocket(s, host, port, autoClose);

            socket.SetEnabledProtocols(socket.GetSupportedProtocols());

            return(socket);
        }
Example #2
0
        public override Java.Net.Socket CreateSocket()
        {
            SSLSocket socket = (SSLSocket)factory.CreateSocket();

            socket.SetEnabledProtocols(socket.GetSupportedProtocols());

            return(socket);
        }
Example #3
0
        public override Java.Net.Socket CreateSocket(string host, int port, Java.Net.InetAddress localHost, int localPort)
        {
            SSLSocket socket = (SSLSocket)factory.CreateSocket(host, port, localHost, localPort);

            socket.SetEnabledProtocols(socket.GetSupportedProtocols());

            return(socket);
        }
        public override Java.Net.Socket CreateSocket(string host, int port)
        {
            SSLSocket socket = (SSLSocket)_factory.CreateSocket(host, port);

            socket.SetEnabledProtocols(socket.GetSupportedProtocols());

            return(socket);
        }
        public override Java.Net.Socket CreateSocket(Java.Net.InetAddress address, int port, Java.Net.InetAddress localAddress, int localPort)
        {
            SSLSocket socket = (SSLSocket)_factory.CreateSocket(address, port, localAddress, localPort);

            socket.SetEnabledProtocols(socket.GetSupportedProtocols());

            return(socket);
        }
        public override Java.Net.Socket CreateSocket(Java.Net.InetAddress host, int port)
        {
            SSLSocket socket = (SSLSocket)factory.CreateSocket(host, port);

            socket.SetEnabledProtocols(socket.GetSupportedProtocols());
            socket.SetEnabledCipherSuites(socket.GetSupportedCipherSuites());

            return(socket);
        }
Example #7
0
        /// <exception cref="System.IO.IOException"></exception>
        public virtual System.Net.Sockets.Socket CreateLayeredSocket(System.Net.Sockets.Socket
                                                                     socket, string target, int port, HttpContext context)
        {
            SSLSocket sslsock = (SSLSocket)this.socketfactory.CreateSocket(socket, target, port
                                                                           , true);

            if (supportedProtocols != null)
            {
                sslsock.SetEnabledProtocols(supportedProtocols);
            }
            if (supportedCipherSuites != null)
            {
                sslsock.SetEnabledCipherSuites(supportedCipherSuites);
            }
            PrepareSocket(sslsock);
            sslsock.StartHandshake();
            VerifyHostname(sslsock, target);
            return(sslsock);
        }