Changeset 31865


Ignore:
Timestamp:
08/09/17 21:10:54 (3 years ago)
Author:
ak19
Message:
  1. Helpful messages appended to the Download log directing the user to turn on the No Certificate Checking option in Prefs' Connection tab, in case downloading over https fails because the site's certificate is invalid. 2. Must not forget to turn off no_check_certificate in Greenstone's wgetrc template wget config file in gs2build/build-src/packages/wget folder
Location:
main/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/classes/dictionary.properties

    r31861 r31865  
    867867Mirroring.DownloadJob.Resume_Tooltip:Resume this download
    868868Mirroring.DownloadJob.Status:Downloaded {0} of {1} files ({2} warnings, {3} errors)
     869Mirroring.DownloadJob.Warning_No_Valid_Certificate:WARNING: Can't download from a site that doesn\'t have a (valid) security certificate.
     870Mirroring.DownloadJob.Enable_NoCheckCertificate:Enable 'No certificate checking' in Preferences > Connection to download insecurely from https URLs.
    869871Mirroring.DownloadJob.Waiting:Waiting to start
    870872Mirroring.DownloadJob.Waiting_User:Waiting for user action
  • main/trunk/gli/src/org/greenstone/gatherer/download/DownloadJob.java

    r31831 r31865  
    10811081        AppendLineOnlyFileDocument download_log = DownloadJob.this.download_log;
    10821082
     1083        boolean noCheckCertificate_needed = false; // determine whether this flag needs to be set for wget (under Preferences > Connection)
     1084       
    10831085        while (!Thread.currentThread().isInterrupted() && (line = br.readLine()) != null
    10841086               && !line.trim().equals("<<Finished>>") /*&& !isStopped()*/) {
     
    11001102                DebugStream.println("***** Requesting robot.txt");
    11011103                ignore_for_robots = true;
     1104            }
     1105            else if(line.indexOf("--no-check-certificate") != -1) {
     1106                downloadWarning();
     1107                noCheckCertificate_needed = true;
    11021108            }
    11031109            // If line contains "=> `" display text as the
     
    11801186            }
    11811187        }
     1188        if(noCheckCertificate_needed) { // can't download from (some nested) URL as its
     1189            // certificate can't be verified. User must turn on --no-check-certificate
     1190            // if they want to download from there anyway, but it will do so insecurely
     1191            download_log.appendLine("************");
     1192            download_log.appendLine(Dictionary.get("Mirroring.DownloadJob.Warning_No_Valid_Certificate"));
     1193            download_log.appendLine(Dictionary.get("Mirroring.DownloadJob.Enable_NoCheckCertificate"));
     1194            download_log.appendLine("************");
     1195        }
    11821196       
    11831197        } catch (IOException ioe) {
  • main/trunk/greenstone2/build-src/packages/wget/wgetrc-gs.in

    r31829 r31865  
    44
    55# for versions with openssl support, don't want to be forced to run wget
    6 # with --no-check-certificate each time
    7 check_certificate = off
     6# with --no-check-certificate each time. Now this is controlled in GLI's
     7# File > Preferences > Connection tab by ticking "No certificate checking"
     8#check_certificate = off
    89
    910## You can use this file to change the default behaviour of wget or to
Note: See TracChangeset for help on using the changeset viewer.