Can now override the public key lifetime by specificying value
for $CFG->mnetkeylifetime in config.php
Merged from STABLE_19
*/
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.'/' , '/');