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

Errors creating open ssl certificate in mnet

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.8, 1.8.1
    • 2.0
    • MNet
    • None
    • Affects all environments. Appears to cause a problem when moodle is installed in a folder nested deep in a site and not at the site root
    • MOODLE_18_STABLE
    • MOODLE_20_STABLE

    Description

      On a moodle install nested more than a couple of folders into a site e.g. http://domain name/folder/sub folder/moodle no ssl certificate is displayed in moodle in the page networking/settings. phpinfo confirms Open ssl is installed.

      Turning on debugging reveals php is reporting an error when creating an open ssl certificate in moodle/mnet/lib.php in the method mnet_generate_keypair . Analysis showed that the common name passed to the method openssl_csr_new in the array $dn contains the value of $CFG->wwwroot i.e. the entire domain name plus the path to the root of the site. The fix involved using the $host variable instead. This variable is defined in the same method and just contains the domain name without the trailing folder paths.

      Once the change was made the ssl information was displayed and new certificates could be generated on demand

      Attachments

        Activity

          People

            donal@catalyst.net.nz Donal McMullan
            colchambers Colin Chambers
            Nobody Nobody
            David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              24/Nov/10