From 15c9f9972128fce19a0f0113b630bcf9ba3a705f Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 11 Aug 2015 07:27:56 -0500 Subject: [PATCH] RSA: fix regression for PSS signatures --- phpseclib/Crypt/RSA.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index dfec4b49..b8602bd8 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -2637,7 +2637,7 @@ class Crypt_RSA // be output. $emLen = ($emBits + 1) >> 3; // ie. ceil($emBits / 8) - $sLen = $this->sLen === false ? $this->hLen : $this->sLen; + $sLen = $this->sLen ? $this->sLen : $this->hLen; $mHash = $this->hash->hash($m); if ($emLen < $this->hLen + $sLen + 2) { @@ -2675,7 +2675,7 @@ class Crypt_RSA // be output. $emLen = ($emBits + 1) >> 3; // ie. ceil($emBits / 8); - $sLen = $this->sLen === false ? $this->hLen : $this->sLen; + $sLen = $this->sLen ? $this->sLen : $this->hLen; $mHash = $this->hash->hash($m); if ($emLen < $this->hLen + $sLen + 2) {