mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-25299 mnet: Fixed validation when no public key is provided
This commit is contained in:
parent
0dde394db5
commit
4460312d08
3 changed files with 6 additions and 2 deletions
|
@ -155,7 +155,7 @@ class mnet_peer {
|
|||
function check_credentials($key) {
|
||||
$credentials = openssl_x509_parse($key);
|
||||
if ($credentials == false) {
|
||||
$this->error[] = array('code' => 3, 'text' => get_string("nonmatchingcert", 'mnet', array('','')));
|
||||
$this->error[] = array('code' => 3, 'text' => get_string("nonmatchingcert", 'mnet', array('subject' => '','host' => '')));
|
||||
return false;
|
||||
} elseif (array_key_exists('subjectAltName', $credentials['subject']) && $credentials['subject']['subjectAltName'] != $this->wwwroot) {
|
||||
$a['subject'] = $credentials['subject']['subjectAltName'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue