1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-15 02:17:04 +01:00

Merge branch '3.0'

This commit is contained in:
terrafrost 2020-07-07 23:35:28 -05:00
commit fe5980e22d
3 changed files with 18 additions and 2 deletions

View File

@ -214,6 +214,20 @@
- Classes were renamed and namespaced ([#243](https://github.com/phpseclib/phpseclib/issues/243)) - Classes were renamed and namespaced ([#243](https://github.com/phpseclib/phpseclib/issues/243))
- The use of an autoloader is now required (e.g. Composer) - The use of an autoloader is now required (e.g. Composer)
## 1.0.19 - 2020-07-07
- SSH2: arcfour128 / arcfour256 were being included twice
- SSH2: make window resizing behave more consistently with PuTTY (#1421)
- SSH2: logging enhancements
- SSH2: try logging in with none as an auth method first (#1454)
- SFTP: change the mode with a SETSTAT instead of MKDIR (#1463)
- SFTP: make it so extending SFTP class doesn't cause a segfault (#1465)
- SFTP: realpath('') produced an error (#1474)
- SFTP: if /path/to/file is a file then /path/to/file/whatever errors (#1475)
- RSA: make PSS verification work for key length that aren't a power of 2 (#1423)
- ASN1: fix for malformed ASN1 strings (#1456)
- ANSI: fix "Number of elements can't be negative" error
## 1.0.18 - 2019-09-16 ## 1.0.18 - 2019-09-16
- SSH2: fix regression for connecting to servers with bad hostnames (#1405) - SSH2: fix regression for connecting to servers with bad hostnames (#1405)

View File

@ -44,7 +44,7 @@ AES, Blowfish, Twofish, SSH-1, SSH-2, SFTP, and X.509
* Composer compatible (PSR-0 autoloading) * Composer compatible (PSR-0 autoloading)
* Install using Composer: `composer require phpseclib/phpseclib:~1.0` * Install using Composer: `composer require phpseclib/phpseclib:~1.0`
* Install using PEAR: See [phpseclib PEAR Channel Documentation](http://phpseclib.sourceforge.net/pear.htm) * Install using PEAR: See [phpseclib PEAR Channel Documentation](http://phpseclib.sourceforge.net/pear.htm)
* [Download 1.0.18 as ZIP](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.18.zip/download) * [Download 1.0.19 as ZIP](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.19.zip/download)
## Security contact information ## Security contact information

View File

@ -3873,6 +3873,7 @@ class SSH2
switch ($this->encrypt->name) { switch ($this->encrypt->name) {
case 'aes128-gcm@openssh.com': case 'aes128-gcm@openssh.com':
case 'aes256-gcm@openssh.com': case 'aes256-gcm@openssh.com':
$startEncrypt = microtime(true);
$this->encrypt->setNonce( $this->encrypt->setNonce(
$this->encrypt->fixed . $this->encrypt->fixed .
$this->encrypt->invocation_counter $this->encrypt->invocation_counter
@ -3880,6 +3881,7 @@ class SSH2
Strings::increment_str($this->encrypt->invocation_counter); Strings::increment_str($this->encrypt->invocation_counter);
$this->encrypt->setAAD($temp = ($packet & "\xFF\xFF\xFF\xFF")); $this->encrypt->setAAD($temp = ($packet & "\xFF\xFF\xFF\xFF"));
$packet = $temp . $this->encrypt->encrypt(substr($packet, 4)); $packet = $temp . $this->encrypt->encrypt(substr($packet, 4));
$encryptTime = microtime(true) - $startEncrypt;
break; break;
case 'chacha20-poly1305@openssh.com': case 'chacha20-poly1305@openssh.com':
$nonce = pack('N2', 0, $this->send_seq_no); $nonce = pack('N2', 0, $this->send_seq_no);
@ -3928,7 +3930,7 @@ class SSH2
$current = microtime(true); $current = microtime(true);
$message_number = isset($this->message_numbers[ord($data[0])]) ? $this->message_numbers[ord($data[0])] : 'UNKNOWN (' . ord($data[0]) . ')'; $message_number = isset($this->message_numbers[ord($data[0])]) ? $this->message_numbers[ord($data[0])] : 'UNKNOWN (' . ord($data[0]) . ')';
$message_number = '-> ' . $message_number . $message_number = '-> ' . $message_number .
' (since last: ' . round($current - $this->last_packet, 4) . ', network: ' . round($stop - $start, 4) . 's)'; ' (since last: ' . round($current - $this->last_packet, 4) . ', network: ' . round($stop - $start, 4) . 's, encrypt time: ' . round($encryptTime, 4) . ')';
$this->append_log($message_number, isset($logged) ? $logged : $data); $this->append_log($message_number, isset($logged) ? $logged : $data);
$this->last_packet = $current; $this->last_packet = $current;
} }