Code example for SSLSocket

Methods: setEnabledProtocols

0
        return socket;
    } 
 
    private void configureSocket(final SSLSocket sslSocket, final HttpParams params) {
        if (isUseSSL3Only(params)) {
            sslSocket.setEnabledProtocols(new String[]{"SSLv3"});
        } 
    } 
 
    @Override 
    public Socket connectSocket(final Socket socket, final InetSocketAddress remoteAddress,
            final InetSocketAddress localAddress,
            final HttpParams params) throws IOException, UnknownHostException, ConnectTimeoutException {
        final HttpHost socksProxy = SocksSocketFactory.getSocksProxy(params);
        if (socksProxy != null) {
            final Socket underlying = SocksSocketFactory.createSocketWithSocksProxy(socksProxy);
            underlying.setReuseAddress(true);
 
            final int connTimeout = HttpConnectionParams.getConnectionTimeout(params);
            final int soTimeout = HttpConnectionParams.getSoTimeout(params);