MDL-29148 MNet - improved handling of a verification function return code

This commit is contained in:
David Mudrak
2011-08-29 01:48:16 +02:00
committed by Eloy Lafuente (stronk7)
parent 28883e9b45
commit 6b27edcc47
+2 -1
View File
@@ -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';
}