diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index c5f697701..49a61f3b3 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -3128,7 +3128,9 @@ function _rsassa_pkcs1_v1_5_verify($m, $s) } // Compare - return $this->_equals($em, $em2) || $this->_equals($em, $em3); + + return ($em2 !== false && $this->_equals($em, $em2)) || + ($em3 !== false && $this->_equals($em, $em3)); } /**