RSA: fix regression for PSS signatures

This commit is contained in:
terrafrost 2015-08-11 07:27:56 -05:00
parent ee16fd44ce
commit 15c9f99721

View File

@ -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) {