From 54941685e3e86ec085641dcb7ebb1f96f06735b2 Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Sun, 28 Aug 2011 01:06:31 +0200 Subject: [PATCH] MDL-29148 MNet - improved handling of a verification function return code --- mnet/xmlrpc/client.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mnet/xmlrpc/client.php b/mnet/xmlrpc/client.php index 02a7cdc65be..39078d25be7 100644 --- a/mnet/xmlrpc/client.php +++ b/mnet/xmlrpc/client.php @@ -295,7 +295,8 @@ class mnet_xmlrpc_client { // ok, it's signed, but is it signed with the right certificate ? // do this *after* we check for an out of date key - if (!openssl_verify($this->xmlrpcresponse, base64_decode($sig_parser->signature), $mnet_peer->public_key)) { + $verified = openssl_verify($this->xmlrpcresponse, base64_decode($sig_parser->signature), $mnet_peer->public_key); + if ($verified != 1) { $this->error[] = 'Invalid signature'; } -- 2.43.0