From: terrafrost <terrafrost@gmail.com>
Date: Sat, 3 Apr 2021 18:16:59 -0500
Subject: RSA: fix for PHP8

Origin: upstream, https://github.com/phpseclib/phpseclib/pull/1635/commits/149b4d213131d4d453fe190700a4ecc3d09de9cc
---
 phpseclib/Crypt/RSA.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php
index 7224771..22dc77b 100644
--- a/phpseclib/Crypt/RSA.php
+++ b/phpseclib/Crypt/RSA.php
@@ -3043,7 +3043,9 @@ class RSA
         }
 
         // Compare
-        return $this->_equals($em, $em2) || $this->_equals($em, $em3);
+
+        return ($em2 !== false && $this->_equals($em, $em2)) ||
+               ($em3 !== false && $this->_equals($em, $em3));
     }
 
     /**
