Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-76580

Developer convenience: allow curl to ignore ssl issues

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Future Dev
    • None
    • Files API, Libraries

    Description

      When working on a local dev box which is ssl but doesn't have a proper cert it would be useful to have a simple option to allow curl to work anyway.

      I was originally thinking a single CFG toggle which changes these:

      https://github.com/moodle/moodle/blob/master/lib/filelib.php#L3264-L3265

      But then I thought it might be more useful and flexible to have something like:

       

      $CFG->curldefaults = [
          'CURLOPT_SSL_VERIFYPEER' => 0,
          'CURLOPT_SSL_VERIFYHOST' => 2,
          'CURLOPT_CONNECTTIMEOUT' => 10,
      ];
      

       

      In particular some of the other settings like the various timeouts may be useful to override in production too.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              brendanheywood Brendan Heywood
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: