8000 RSA: fix for PHP8 · phpseclib/phpseclib@149b4d2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 149b4d2

Browse files
committed
RSA: fix for PHP8
1 parent 8af4280 commit 149b4d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

phpseclib/Crypt/RSA.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3128,7 +3128,9 @@ function _rsassa_pkcs1_v1_5_verify($m, $s)
31283128
}
31293129

31303130
// Compare
3131-
return $this->_equals($em, $em2) || $this->_equals($em, $em3);
3131+
3132+
return ($em2 !== false && $this->_equals($em, $em2)) ||
3133+
($em3 !== false && $this->_equals($em, $em3));
31323134
}
31333135

31343136
/**

0 commit comments

Comments
 (0)
0