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

Errors creating open ssl certificate in mnet

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.8, 1.8.1
    • Fix Version/s: 2.0
    • Component/s: MNet
    • Labels:
      None
    • Environment:
      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
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      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

            Assignee:
            donal@catalyst.net.nz Donal McMullan
            Reporter:
            colchambers Colin Chambers
            Tester:
            Nobody
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              24/Nov/10