]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15476
authorthepurpleblob <thepurpleblob>
Mon, 30 Jun 2008 14:55:48 +0000 (14:55 +0000)
committerthepurpleblob <thepurpleblob>
Mon, 30 Jun 2008 14:55:48 +0000 (14:55 +0000)
Can now override the public key lifetime by specificying value
for $CFG->mnetkeylifetime in config.php

Merged from STABLE_19

mnet/lib.php

index e50355802ad6000cb8ae84413444f8f943dc0b7c..05e955965140f6ff308cdbb389012d50ca556670 100644 (file)
@@ -339,6 +339,12 @@ function mnet_get_keypair() {
  */
 function mnet_generate_keypair($dn = null, $days=28) {
     global $CFG, $USER, $DB;
+
+    // check if lifetime has been overriden
+    if (!empty($CFG->mnetkeylifetime)) {
+        $days = $CFG->mnetkeylifetime;
+    }
+
     $host = strtolower($CFG->wwwroot);
     $host = ereg_replace("^http(s)?://",'',$host);
     $break = strpos($host.'/' , '/');