Community
Participate
Working Groups
String result = null;
try {
// connect to the bugzilla server
URLConnection cntx = UrlConnectionUtil.getUrlConnection(postUrl, proxySettings);
URLConnection cntx = UrlConnectionUtil.getUrlConnection(postUrl, proxySettings, false);
if (cntx == null || !(cntx instanceof HttpURLConnection))
return null;
String url = repositoryUrl + POST_ARGS_ATTACHMENT_DOWNLOAD + id;
url = BugzillaServerFacade.addCredentials(url, userName, password);
URL downloadUrl = new URL(url);
URLConnection connection = UrlConnectionUtil.getUrlConnection(downloadUrl, proxySettings);
URLConnection connection = UrlConnectionUtil.getUrlConnection(downloadUrl, proxySettings, false);
if (connection != null) {
InputStream input = connection.getInputStream();
outStream = new FileOutputStream(destinationFile);
protected void collectResults(URL url, Proxy proxySettings, String characterEncoding,
DefaultHandler contentHandler, boolean clean) throws IOException, LoginException, KeyManagementException,
NoSuchAlgorithmException, BugzillaException {
URLConnection cntx = UrlConnectionUtil.getUrlConnection(url, proxySettings);
URLConnection cntx = UrlConnectionUtil.getUrlConnection(url, proxySettings, false);
if (cntx == null || !(cntx instanceof HttpURLConnection)) {
throw new IOException("Could not form URLConnection.");
}
monitor.beginTask("Validating server settings", IProgressMonitor.UNKNOWN);
Proxy proxySettings = TasksUiPlugin.getDefault().getProxySettings();
URLConnection cntx = UrlConnectionUtil.getUrlConnection(serverURL, proxySettings);
URLConnection cntx = UrlConnectionUtil.getUrlConnection(serverURL, proxySettings, false);
throw new MalformedURLException();
* @param proxy
* can be null
*/
public static URLConnection getUrlConnection(URL url, Proxy proxy) throws IOException, NoSuchAlgorithmException,
public static URLConnection getUrlConnection(URL url, Proxy proxy, boolean useTls) throws IOException,
KeyManagementException {
NoSuchAlgorithmException, KeyManagementException {
SSLContext ctx = SSLContext.getInstance("TLS");
SSLContext ctx;
if (useTls)
ctx = SSLContext.getInstance("TLS");
else
ctx = SSLContext.getInstance("SSL");
javax.net.ssl.TrustManager[] tm = new javax.net.ssl.TrustManager[] { new RepositoryTrustManager() };
ctx.init(null, tm, null);