return SVNSocketFactory.createSSLSocket(authManager != null ? authManager.getSSLManager(myLocation) : null, host, port);
return SVNSocketFactory.createSSLSocket(authManager != null ? authManager.getSSLManager(myRepository.getLocation()) : null, host, port);
    private HttpClient getHttpClient() throws SVNException {        if (myClient == null) {            myClient = new HttpClient();            // host            final ISVNAuthenticationManager authManager = myRepository.getAuthenticationManager();            HostConfiguration hostConfiguration = new HostConfiguration();            if (!"https".equalsIgnoreCase(myLocation.getProtocol())) {                hostConfiguration.setHost(myLocation.getHost(), myLocation.getPort(), myLocation.getProtocol());            } else {                Protocol protocol = new Protocol("https", new ProtocolSocketFactory() {                    public Socket createSocket(String host, int port, InetAddress localAddress, int localPort) throws IOException, UnknownHostException {                        return createSocket(host, port);                    }                    public Socket createSocket(String host, int port, InetAddress localAddress, int localPort, HttpConnectionParams params) throws IOException, UnknownHostException, ConnectTimeoutException {                        return createSocket(host, port);                    }                    public Socket createSocket(String host, int port) throws IOException, UnknownHostException {                        try {                            return SVNSocketFactory.createSSLSocket(authManager != null ? authManager.getSSLManager(myLocation) : null, host, port);                        } catch (SVNException e) {                            throw new IOException(e.getMessage());                        }                    }                }, 443);                hostConfiguration.setHost(myLocation.getHost(), myLocation.getPort(), protocol);            }            ISVNProxyManager proxyManager = authManager != null ? authManager.getProxyManager(myLocation) : null;            if (proxyManager != null && proxyManager.getProxyHost() != null) {                hostConfiguration.setProxy(proxyManager.getProxyHost(), proxyManager.getProxyPort());            }            myClient.setHostConfiguration(hostConfiguration);            // params.            myClient.getParams().setContentCharset("UTF-8");            myClient.getParams().setAuthenticationPreemptive(true);            myClient.getParams().setParameter(CredentialsProvider.PROVIDER, this);            if (authManager != null && authManager.isAuthenticationForced()) {                try {                    Credentials credentials = getCredentials(null, myLocation.getHost(), myLocation.getPort(), false);                    myClient.getState().setCredentials(AuthScope.ANY, credentials);                } catch (CredentialsNotAvailableException e) {                }            }            String agent = (String) myClient.getParams().getParameter(HttpMethodParams.USER_AGENT);            if (agent != null) {                agent = Version.getVersionString() + " with " + agent;            } else {                agent = Version.getVersionString();            }            myClient.getParams().setParameter(HttpMethodParams.USER_AGENT, agent);            // proxy.            myClient.getHttpConnectionManager().getParams().setStaleCheckingEnabled(true);            if (proxyManager != null && proxyManager.getProxyUserName() != null && proxyManager.getProxyPassword() != null) {                myClient.getState().setProxyCredentials(AuthScope.ANY,                         new UsernamePasswordCredentials(proxyManager.getProxyUserName() + ":" + proxyManager.getProxyPassword()));            }        }        return myClient;    }