From: donal72 Date: Tue, 16 Oct 2007 13:30:13 +0000 (+0000) Subject: Display a breakdown of certificate credentials information to assist in debugging... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4275772978439bdc1c1494fa581abb7a0b9fa1fc;p=moodle.git Display a breakdown of certificate credentials information to assist in debugging. MDL-11020, MDL-10326 --- diff --git a/admin/mnet/mnet_review.html b/admin/mnet/mnet_review.html index 31fdcad9d7..1243b097cc 100644 --- a/admin/mnet/mnet_review.html +++ b/admin/mnet/mnet_review.html @@ -124,6 +124,23 @@ if (isset($mnet_peer->ip_address) && '' != $mnet_peer->ip_address){ ip_address; ?> + + + : +
 $credential) {
+            if (is_scalar($credential)) {
+                echo str_pad($key, 16, " ", STR_PAD_LEFT).': '.$credential."\n";
+            } else {
+                echo str_pad($key, 16, " ", STR_PAD_LEFT).': '.var_export($credential,1)."\n";
+            }
+        }
+        ?>
+ + diff --git a/admin/mnet/peers.php b/admin/mnet/peers.php index 7b50363a51..dcb35ee6f7 100644 --- a/admin/mnet/peers.php +++ b/admin/mnet/peers.php @@ -103,7 +103,8 @@ if (($form = data_submitted()) && confirm_sesskey()) { } else { $oldkey = $mnet_peer->public_key; $mnet_peer->public_key = $form->public_key; - $mnet_peer->public_key_expires = $mnet_peer->check_common_name($form->public_key); + $credentials = $mnet_peer->check_credentials($form->public_key); + $mnet_peer->public_key_expires = $credentials['validTo_time_t']; if ($mnet_peer->public_key_expires == false) { $mnet_peer->public_key == $oldkey; $errmsg = '
'; @@ -114,6 +115,8 @@ if (($form = data_submitted()) && confirm_sesskey()) { exit; } } + } else { + $credentials = $mnet_peer->check_credentials($mnet_peer->public_key); } // PREVENT DUPLICATE RECORDS /////////////////////////////////////////// @@ -141,6 +144,7 @@ if (($form = data_submitted()) && confirm_sesskey()) { if($currentkey == $mnet_peer->public_key) unset($currentkey); $form = new stdClass(); if ($hostid != $CFG->mnet_all_hosts_id) { + $credentials = $mnet_peer->check_credentials($mnet_peer->public_key); include('./mnet_review.html'); } else { include('./mnet_review_allhosts.html'); diff --git a/lang/en_utf8/mnet.php b/lang/en_utf8/mnet.php index dda04558de..57e01289c0 100644 --- a/lang/en_utf8/mnet.php +++ b/lang/en_utf8/mnet.php @@ -238,6 +238,7 @@ $string['enrolcourseenrol_desc'] = 'Enrol/unenrol users from this course using M Other enrolled users'; $string['host'] = 'host'; $string['loginlinkmnetuser'] = '
If you are a Moodle Network remote user and can confirm your email address here, you can be redirected to your login page.
'; +$string['certdetails'] = 'Cert Details'; $string['error7020'] = 'This error normally occurs if the remote site has created a record for you with the wrong wwwroot, for example, http://yoursite.com instead of http://www.yoursite.com. You should contact the administrator of the remote site with your wwwroot (as specified in config.php) asking her to update her record for your host.'; $string['error7023'] = 'The remote site has tried to decrypt your message with all the keys it has on record for your site. They have all failed. You might be able to fix this problem by manually re-keying with the remote site. This is unlikely to occur unless you\'ve been out of communication with the remote site for a few months.';