Skip to content

Commit

Permalink
Merge branch 'MDL-74394' of https://github.com/aolley/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyatregubov committed Apr 22, 2022
2 parents b359ba8 + c24922f commit 427de94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mnet/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ function mnet_encrypt_message($message, $remote_certificate) {
// Generate a key resource from the remote_certificate text string
$publickey = openssl_get_publickey($remote_certificate);

if ( gettype($publickey) != 'resource' ) {
if ($publickey === false) {
// Remote certificate is faulty.
return false;
}
Expand Down

0 comments on commit 427de94

Please sign in to comment.