From: thepurpleblob Date: Mon, 30 Jun 2008 14:55:48 +0000 (+0000) Subject: MDL-15476 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=38612df89962aa5ca6c989368f70db3370455415;p=moodle.git MDL-15476 Can now override the public key lifetime by specificying value for $CFG->mnetkeylifetime in config.php Merged from STABLE_19 --- diff --git a/mnet/lib.php b/mnet/lib.php index e50355802a..05e9559651 100644 --- a/mnet/lib.php +++ b/mnet/lib.php @@ -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.'/' , '/');