From 453e6fcf1846ec8342e5188b73900320501a7b9b Mon Sep 17 00:00:00 2001 From: terrafrost Date: Mon, 31 Aug 2015 22:44:41 -0500 Subject: [PATCH] RSA: some of the exceptions being thrown weren't valid --- phpseclib/Crypt/RSA.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index 34f65fe7..86b89dbc 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -2747,7 +2747,7 @@ class RSA // Length checking if (strlen($s) != $this->k) { - throw new \RuntimeSignature('Invalid signature'); + throw new \RuntimeException('Invalid signature'); } // RSA verification @@ -2755,11 +2755,11 @@ class RSA $s = $this->_os2ip($s); $m2 = $this->_rsavp1($s); if ($m2 === false) { - throw new \RuntimeSignature('Invalid signature'); + throw new \RuntimeException('Invalid signature'); } $em = $this->_i2osp($m2, $this->k); if ($em === false) { - throw new \RuntimeSignature('Invalid signature'); + throw new \RuntimeException('Invalid signature'); } // EMSA-PKCS1-v1_5 encoding