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 151896 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/mylar/internal/bugzilla/core/BugzillaReportSubmitForm.java (-1 / +1 lines)
Lines 344-350 Link Here
344
		String result = null;
344
		String result = null;
345
		try {
345
		try {
346
			// connect to the bugzilla server
346
			// connect to the bugzilla server
347
			URLConnection cntx = UrlConnectionUtil.getUrlConnection(postUrl, proxySettings);
347
			URLConnection cntx = UrlConnectionUtil.getUrlConnection(postUrl, proxySettings, false);
348
			if (cntx == null || !(cntx instanceof HttpURLConnection))
348
			if (cntx == null || !(cntx instanceof HttpURLConnection))
349
				return null;
349
				return null;
350
350
(-)src/org/eclipse/mylar/internal/bugzilla/core/BugzillaAttachmentHandler.java (-1 / +1 lines)
Lines 195-201 Link Here
195
			String url = repositoryUrl + POST_ARGS_ATTACHMENT_DOWNLOAD + id;
195
			String url = repositoryUrl + POST_ARGS_ATTACHMENT_DOWNLOAD + id;
196
			url = BugzillaServerFacade.addCredentials(url, userName, password);
196
			url = BugzillaServerFacade.addCredentials(url, userName, password);
197
			URL downloadUrl = new URL(url);
197
			URL downloadUrl = new URL(url);
198
			URLConnection connection = UrlConnectionUtil.getUrlConnection(downloadUrl, proxySettings);
198
			URLConnection connection = UrlConnectionUtil.getUrlConnection(downloadUrl, proxySettings, false);
199
			if (connection != null) {
199
			if (connection != null) {
200
				InputStream input = connection.getInputStream();
200
				InputStream input = connection.getInputStream();
201
				outStream = new FileOutputStream(destinationFile);
201
				outStream = new FileOutputStream(destinationFile);
(-)src/org/eclipse/mylar/internal/bugzilla/core/AbstractReportFactory.java (-1 / +1 lines)
Lines 56-62 Link Here
56
	protected void collectResults(URL url, Proxy proxySettings, String characterEncoding,
56
	protected void collectResults(URL url, Proxy proxySettings, String characterEncoding,
57
			DefaultHandler contentHandler, boolean clean) throws IOException, LoginException, KeyManagementException,
57
			DefaultHandler contentHandler, boolean clean) throws IOException, LoginException, KeyManagementException,
58
			NoSuchAlgorithmException, BugzillaException {
58
			NoSuchAlgorithmException, BugzillaException {
59
		URLConnection cntx = UrlConnectionUtil.getUrlConnection(url, proxySettings);
59
		URLConnection cntx = UrlConnectionUtil.getUrlConnection(url, proxySettings, false);
60
		if (cntx == null || !(cntx instanceof HttpURLConnection)) {
60
		if (cntx == null || !(cntx instanceof HttpURLConnection)) {
61
			throw new IOException("Could not form URLConnection.");
61
			throw new IOException("Could not form URLConnection.");
62
		}
62
		}
(-)src/org/eclipse/mylar/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java (-1 / +1 lines)
Lines 146-152 Link Here
146
					monitor.beginTask("Validating server settings", IProgressMonitor.UNKNOWN);
146
					monitor.beginTask("Validating server settings", IProgressMonitor.UNKNOWN);
147
					try {
147
					try {
148
						Proxy proxySettings = TasksUiPlugin.getDefault().getProxySettings();
148
						Proxy proxySettings = TasksUiPlugin.getDefault().getProxySettings();
149
						URLConnection cntx = UrlConnectionUtil.getUrlConnection(serverURL, proxySettings);
149
						URLConnection cntx = UrlConnectionUtil.getUrlConnection(serverURL, proxySettings, false);
150
						if (cntx == null || !(cntx instanceof HttpURLConnection)) {
150
						if (cntx == null || !(cntx instanceof HttpURLConnection)) {
151
							throw new MalformedURLException();
151
							throw new MalformedURLException();
152
						}
152
						}
(-)src/org/eclipse/mylar/internal/tasks/core/UrlConnectionUtil.java (-3 / +7 lines)
Lines 47-55 Link Here
47
	 * @param proxy
47
	 * @param proxy
48
	 *            can be null
48
	 *            can be null
49
	 */
49
	 */
50
	public static URLConnection getUrlConnection(URL url, Proxy proxy) throws IOException, NoSuchAlgorithmException,
50
	public static URLConnection getUrlConnection(URL url, Proxy proxy, boolean useTls) throws IOException,
51
			KeyManagementException {
51
			NoSuchAlgorithmException, KeyManagementException {
52
		SSLContext ctx = SSLContext.getInstance("TLS");
52
		SSLContext ctx;
53
		if (useTls)
54
			ctx = SSLContext.getInstance("TLS");
55
		else
56
			ctx = SSLContext.getInstance("SSL");
53
57
54
		javax.net.ssl.TrustManager[] tm = new javax.net.ssl.TrustManager[] { new RepositoryTrustManager() };
58
		javax.net.ssl.TrustManager[] tm = new javax.net.ssl.TrustManager[] { new RepositoryTrustManager() };
55
		ctx.init(null, tm, null);
59
		ctx.init(null, tm, null);

Return to bug 151896