From b6c01f93186db18641d6747c2ae6532753913ed1 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Mon, 12 Jun 2023 17:14:30 -0500 Subject: [PATCH] SSH2: backport some E_DEPRECATED fixes from 3.0 --- phpseclib/Net/SSH2.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index f5a149db..2e448432 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -405,6 +405,14 @@ class Net_SSH2 */ var $decrypt = false; + /** + * Decryption Algorithm Name + * + * @var string|null + * @access private + */ + var $decryptName; + /** * Client to Server Encryption Object * @@ -414,6 +422,14 @@ class Net_SSH2 */ var $encrypt = false; + /** + * Encryption Algorithm Name + * + * @var string|null + * @access private + */ + var $encryptName; + /** * Client to Server HMAC Object * @@ -1981,7 +1997,7 @@ class Net_SSH2 } $this->encrypt->setKey(substr($key, 0, $encryptKeyLength)); - $this->encrypt->name = $decrypt; + $this->encryptName = $encrypt; } if ($this->decrypt) { @@ -2007,7 +2023,7 @@ class Net_SSH2 } $this->decrypt->setKey(substr($key, 0, $decryptKeyLength)); - $this->decrypt->name = $decrypt; + $this->decryptName = $decrypt; } /* The "arcfour128" algorithm is the RC4 cipher, as described in