Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 102654 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java (-14 / +11 lines)
Lines 15-21 Link Here
15
import java.net.Socket;
15
import java.net.Socket;
16
import java.net.UnknownHostException;
16
import java.net.UnknownHostException;
17
import java.util.Enumeration;
17
import java.util.Enumeration;
18
import java.util.Map;
19
18
20
import org.eclipse.core.runtime.*;
19
import org.eclipse.core.runtime.*;
21
import org.eclipse.jface.preference.IPreferenceStore;
20
import org.eclipse.jface.preference.IPreferenceStore;
Lines 396-427 Link Here
396
			}
395
			}
397
396
398
			if (jschSession == null) {
397
			if (jschSession == null) {
399
398
				boolean useProxy = CVSProviderPlugin.getPlugin().isUseProxy();
400
				boolean useProxy = store.getString(ISSHContants.KEY_PROXY).equals("true"); //$NON-NLS-1$
401
                Proxy proxy = null;
399
                Proxy proxy = null;
402
				if (useProxy) {
400
				if (useProxy) {
403
					String _type = store.getString(ISSHContants.KEY_PROXY_TYPE);
401
					String _type = CVSProviderPlugin.getPlugin().getProxyType();
404
					String _host = store.getString(ISSHContants.KEY_PROXY_HOST);
402
					String _host = CVSProviderPlugin.getPlugin().getProxyHost();
405
					String _port = store.getString(ISSHContants.KEY_PROXY_PORT);
403
					String _port = CVSProviderPlugin.getPlugin().getProxyPort();
406
404
407
					boolean useAuth = store.getString(ISSHContants.KEY_PROXY_AUTH).equals("true"); //$NON-NLS-1$
405
					boolean useAuth = CVSProviderPlugin.getPlugin().isUseProxyAuth();
408
					String _user = ""; //$NON-NLS-1$
406
					String _user = ""; //$NON-NLS-1$
409
					String _pass = ""; //$NON-NLS-1$
407
					String _pass = ""; //$NON-NLS-1$
410
					
408
					
411
					// Retrieve username and password from keyring.
409
					// Retrieve username and password from keyring.
412
					Map map = Platform.getAuthorizationInfo(CVSSSH2PreferencePage.FAKE_URL, "proxy", CVSSSH2PreferencePage.AUTH_SCHEME); //$NON-NLS-1$
410
					if(useAuth){
413
				    if(map!=null){
411
						_user=CVSProviderPlugin.getPlugin().getProxyUser();
414
				      _user=(String) map.get(ISSHContants.KEY_PROXY_USER);
412
						_pass=CVSProviderPlugin.getPlugin().getProxyPassword();
415
				      _pass=(String) map.get(ISSHContants.KEY_PROXY_PASS);
413
					}
416
				    }
417
414
418
					String proxyhost = _host + ":" + _port; //$NON-NLS-1$
415
					String proxyhost = _host + ":" + _port; //$NON-NLS-1$
419
					if (_type.equals(ISSHContants.HTTP)) {
416
					if (_type.equals(CVSProviderPlugin.PROXY_TYPE_HTTP)) {
420
						proxy = new ProxyHTTP(proxyhost);
417
						proxy = new ProxyHTTP(proxyhost);
421
						if (useAuth) {
418
						if (useAuth) {
422
							((ProxyHTTP) proxy).setUserPasswd(_user, _pass);
419
							((ProxyHTTP) proxy).setUserPasswd(_user, _pass);
423
						}
420
						}
424
					} else if (_type.equals(ISSHContants.SOCKS5)) {
421
					} else if (_type.equals(CVSProviderPlugin.PROXY_TYPE_SOCKS5)) {
425
						proxy = new ProxySOCKS5(proxyhost);
422
						proxy = new ProxySOCKS5(proxyhost);
426
						if (useAuth) {
423
						if (useAuth) {
427
							((ProxySOCKS5) proxy).setUserPasswd(_user, _pass);
424
							((ProxySOCKS5) proxy).setUserPasswd(_user, _pass);
(-)src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2PreferencePage.java (-3 / +4 lines)
Lines 114-124 Link Here
114
    TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
114
    TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
115
    tabItem.setText(CVSSSH2Messages.CVSSSH2PreferencePage_19); 
115
    tabItem.setText(CVSSSH2Messages.CVSSSH2PreferencePage_19); 
116
    tabItem.setControl(createGeneralPage(tabFolder));
116
    tabItem.setControl(createGeneralPage(tabFolder));
117
117
/*
118
    tabItem = new TabItem(tabFolder, SWT.NONE);
118
    tabItem = new TabItem(tabFolder, SWT.NONE);
119
    tabItem.setText(CVSSSH2Messages.CVSSSH2PreferencePage_20); 
119
    tabItem.setText(CVSSSH2Messages.CVSSSH2PreferencePage_20); 
120
    tabItem.setControl(createProxyPage(tabFolder));
120
    tabItem.setControl(createProxyPage(tabFolder));
121
121
*/
122
    tabItem = new TabItem(tabFolder, SWT.NONE);
122
    tabItem = new TabItem(tabFolder, SWT.NONE);
123
    tabItem.setText(CVSSSH2Messages.CVSSSH2PreferencePage_21); 
123
    tabItem.setText(CVSSSH2Messages.CVSSSH2PreferencePage_21); 
124
    tabItem.setControl(createKeyManagementPage(tabFolder));
124
    tabItem.setControl(createKeyManagementPage(tabFolder));
Lines 228-234 Link Here
228
228
229
    return group;
229
    return group;
230
  }
230
  }
231
231
/*
232
  private Control createProxyPage(Composite parent) {
232
  private Control createProxyPage(Composite parent) {
233
    Composite group=new Composite(parent, SWT.NULL);
233
    Composite group=new Composite(parent, SWT.NULL);
234
    GridLayout layout=new GridLayout();
234
    GridLayout layout=new GridLayout();
Lines 340-345 Link Here
340
      });
340
      });
341
    return group;
341
    return group;
342
  }
342
  }
343
  */
343
  private Control createKeyManagementPage(Composite parent) {
344
  private Control createKeyManagementPage(Composite parent) {
344
    int columnSpan=3;
345
    int columnSpan=3;
345
    Composite group=new Composite(parent, SWT.NULL);
346
    Composite group=new Composite(parent, SWT.NULL);

Return to bug 102654