MDL-15476

Can now override the public key lifetime by specificying value
for $CFG->mnetkeylifetime in config.php
This commit is contained in:
thepurpleblob
2008-06-30 14:54:16 +00:00
parent 08e6717022
commit d0de789783
+6
View File
@@ -307,6 +307,12 @@ function mnet_get_keypair() {
*/
function mnet_generate_keypair($dn = null, $days=28) {
global $CFG, $USER;
// 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.'/' , '/');