Index: main/trunk/gli/src/org/greenstone/gatherer/download/ServerInfoDialog.java
===================================================================
--- main/trunk/gli/src/org/greenstone/gatherer/download/ServerInfoDialog.java	(revision 31852)
+++ main/trunk/gli/src/org/greenstone/gatherer/download/ServerInfoDialog.java	(revision 31860)
@@ -106,6 +106,6 @@
 	try {
 	    String [] env = null;
-	    SafeProcess prcs = null; 
-	  
+	    SafeProcess prcs = null;
+	    
 	    if (Utility.isWindows()) {
 		prcs = new SafeProcess(command);
Index: main/trunk/gli/src/org/greenstone/gatherer/gui/DownloadPane.java
===================================================================
--- main/trunk/gli/src/org/greenstone/gatherer/gui/DownloadPane.java	(revision 31852)
+++ main/trunk/gli/src/org/greenstone/gatherer/gui/DownloadPane.java	(revision 31860)
@@ -571,4 +571,15 @@
 		// redirect url (we do this step in order to avoid some unintuitive behaviour from wget)
 		Download current_download = (Download)download_map.get(mode);
+		
+		boolean noCheckCertificate = Configuration.get("general.no_check_certificate", true);		
+		Argument no_check_cert_arg = current_download.getArgument("no_check_certificate");
+		if(noCheckCertificate) {
+		    no_check_cert_arg.setValue("true");
+		    no_check_cert_arg.setAssigned(true);
+		} else {
+		    no_check_cert_arg.setValue("false");
+		    no_check_cert_arg.setAssigned(false); // only assigned Arguments have values
+		}
+
 		Argument arg_url = current_download.getArgument("url");
 		
@@ -576,16 +587,16 @@
 		    String url_str = arg_url.getValue();	
 			
-			// No longer following URL redirects, since some of this has been taken care of by wget
-			// For the rest, assume the user will get the URL right that they want to download from
-			/*
-		    String redirect_url_str = getRedirectURL(url_str);
-		    
-		    // only update the Argument and its GUI ArgumentControl if the URL
-		    // has in fact changed
-		    if(!url_str.equals(redirect_url_str)) {
-			arg_url.setValue(redirect_url_str);
-			updateArgument(arg_url, redirect_url_str);
-		    }
-			*/
+		    // No longer following URL redirects, since some of this has been taken care of by wget
+		    // For the rest, assume the user will get the URL right that they want to download from
+		    /*
+		      String redirect_url_str = getRedirectURL(url_str);
+		      
+		      // only update the Argument and its GUI ArgumentControl if the URL
+		      // has in fact changed
+		      if(!url_str.equals(redirect_url_str)) {
+		      arg_url.setValue(redirect_url_str);
+		      updateArgument(arg_url, redirect_url_str);
+		      }
+		    */
 		}
 		
@@ -758,16 +769,16 @@
 		// Write the use proxy command - we don't do this anymore, instead we set environment variables - hopefully these can't be spied on like the following can (using ps) - actually the environment stuff didn't work for windows, so lets go back to this
 		if (Utility.isWindows()) {
-		     
-		   arg.setValue("true");
+		   
+		   arg.setValue("true"); // proxy_on argument
 		   arg.setAssigned(true);
-
+		   
 		   arg = current_download.getArgument("proxy_host");
 		   arg.setValue(proxy_host);
 		   arg.setAssigned(true);
-
+		   
 		   arg = current_download.getArgument("proxy_port");
 		   arg.setValue(proxy_port);
 		   arg.setAssigned(true);
-
+	    
 		   arg = current_download.getArgument("user_name");
 		   arg.setValue(user_pass.substring(0, user_pass.indexOf("@")));
@@ -822,4 +833,15 @@
 	    }
 
+	    boolean noCheckCertificate = Configuration.get("general.no_check_certificate", true);
+	    Argument no_check_cert_arg = current_download.getArgument("no_check_certificate");
+	    if(noCheckCertificate) {		
+		no_check_cert_arg.setValue("true");
+		no_check_cert_arg.setAssigned(true);
+	    } else {
+		no_check_cert_arg.setValue("false");
+		no_check_cert_arg.setAssigned(false); // only assigned Arguments have values
+	    }
+	    
+	    
 	    //str_url = getRedirectURL(str_url); // work out the real URL
 
Index: main/trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java
===================================================================
--- main/trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java	(revision 31852)
+++ main/trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java	(revision 31860)
@@ -71,4 +71,5 @@
     private JButton ok_button;
     private JCheckBox show_file_size_checkbox;
+    private JCheckBox no_check_certificate_checkbox; // Set no_check_certificate when retrieving Https URLs that have no (valid) certificate
     private JCheckBox use_proxy_checkbox;
     private JCheckBox view_extracted_metadata_checkbox;
@@ -318,4 +319,6 @@
 	    chdir_button.setEnabled(false);
 	}
+
+	boolean no_check_cert_enabled = Configuration.get("general.no_check_certificate", true); // pass true to look in general rather than collection specific config file
 	
 	boolean currently_enabled = Configuration.get("general.use_proxy", true);
@@ -323,4 +326,10 @@
 	JPanel connection_pane = new JPanel();
         connection_pane.setComponentOrientation(Dictionary.getOrientation());
+	no_check_certificate_checkbox = new JCheckBox(Dictionary.get("Preferences.Connection.No_Check_Certificate"));
+	no_check_certificate_checkbox.setToolTipText(Dictionary.get("Preferences.Connection.No_Check_Certificate_Tooltip"));
+	no_check_certificate_checkbox.setSelected(no_check_cert_enabled);
+	no_check_certificate_checkbox.setComponentOrientation(Dictionary.getOrientation());        
+	no_check_certificate_checkbox.setPreferredSize(ROW_SIZE);
+	
 	use_proxy_checkbox = new JCheckBox(Dictionary.get("Preferences.Connection.Use_Proxy"));
 	use_proxy_checkbox.setSelected(currently_enabled);
@@ -360,4 +369,5 @@
 	
 	// Connection
+	no_check_certificate_checkbox.addActionListener(new NoCheckCertificateListener());
 	use_proxy_checkbox.addActionListener(new UseProxyListener());
 	if (Gatherer.GS3) {
@@ -404,5 +414,5 @@
 
 	connection_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
-	connection_pane.setLayout(new GridLayout(8,1,0,2));
+	connection_pane.setLayout(new GridLayout(9,1,0,2));
 	connection_pane.add(program_pane);
 	connection_pane.add(library_path_pane);
@@ -416,4 +426,5 @@
 	connection_pane.add(collect_dir_pane);
 
+	connection_pane.add(no_check_certificate_checkbox);
 	connection_pane.add(use_proxy_checkbox);
 	connection_pane.add(proxy_host_pane);
@@ -1119,4 +1130,12 @@
     }
 
+    private class NoCheckCertificateListener implements ActionListener {
+	public void actionPerformed(ActionEvent event) {
+	    boolean isEnabled = no_check_certificate_checkbox.isSelected();
+	    Configuration.set("general.no_check_certificate", true, isEnabled);
+	    boolean no_check_cert_enabled = Configuration.get("general.no_check_certificate", true);
+	}
+    }
+    
     private class UseProxyListener
 	implements ActionListener {
