From c1b70c21cbccc119ab4b6e212462301a1cedf431 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 16 Jan 2021 09:59:45 -0600 Subject: [PATCH] RSA: the salt length isn't saved for new keys --- phpseclib/Crypt/RSA/PrivateKey.php | 2 +- phpseclib/Crypt/RSA/PublicKey.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpseclib/Crypt/RSA/PrivateKey.php b/phpseclib/Crypt/RSA/PrivateKey.php index 2830d982..5205ce63 100644 --- a/phpseclib/Crypt/RSA/PrivateKey.php +++ b/phpseclib/Crypt/RSA/PrivateKey.php @@ -512,7 +512,7 @@ class PrivateKey extends RSA implements Common\PrivateKey $options+= [ 'hash' => $this->hash->getHash(), 'MGFHash' => $this->mgfHash->getHash(), - 'saltLength' => $this->sLen + 'saltLength' => $this->getSaltLength() ]; } else { throw new UnsupportedFormatException('The PSS format can only be used when the signature method has been explicitly set to PSS'); diff --git a/phpseclib/Crypt/RSA/PublicKey.php b/phpseclib/Crypt/RSA/PublicKey.php index 4a080d7c..3475ad99 100644 --- a/phpseclib/Crypt/RSA/PublicKey.php +++ b/phpseclib/Crypt/RSA/PublicKey.php @@ -475,7 +475,7 @@ class PublicKey extends RSA implements Common\PublicKey $options+= [ 'hash' => $this->hash->getHash(), 'MGFHash' => $this->mgfHash->getHash(), - 'saltLength' => $this->sLen + 'saltLength' => $this->getSaltLength() ]; } else { throw new UnsupportedFormatException('The PSS format can only be used when the signature method has been explicitly set to PSS');