SSH2: make it so you can connect using open sockets / 2.0 branch
* terrafrost/ssh-custom-socket-2.0:
SSH2: move where $host is defined
SSH2: make it so you can connect using open sockets
SSH2: make it so you can connect using open sockets / 1.0 branch
* terrafrost/ssh-custom-socket-1.0:
SSH2: move where $host is defined
SSH2: make it so you can connect using open sockets
+ No more empty for-loop bodies
+ No more counting variables $i leaked into outer context
+ No more unintuitive $i == count(...) comparisons
+ No more array / hash table access of the form $kex_algorithms[$i]
- Function call overhead; not in the performance critical path, though.
* PSR2-1.0:
Fix indentation phpcbf did not fix.
Remove PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket exception.
Use phpcbf to fix PHP code to ruleset.
Ignore coding guidelines in ANSI switch block.
Base code sniffer ruleset on PSR2 rather than PEAR.
Update PHP Code Sniffer to 2.3.3
Conflicts:
build/code-sniffer-ruleset-tests.xml
build/code-sniffer-ruleset.xml
composer.lock
phpseclib/Crypt/DES.php
phpseclib/Crypt/Hash.php
phpseclib/Crypt/RSA.php
phpseclib/File/X509.php
phpseclib/Math/BigInteger.php
phpseclib/Net/SFTP.php
phpseclib/Net/SSH1.php
phpseclib/Net/SSH2.php
tests/Functional/Net/SFTPUserStoryTest.php
tests/Unit/Crypt/TwofishTest.php
Add support for RFC 4419: diffie-hellman-group-exchange-sha{1,256}
* bantu/diffie-hellman-group-exchange-sha256:
Add support for RFC 4419: diffie-hellman-group-exchange-sha{1,256}
fix E_NOTICE with SSH2 global requests
* terrafrost/ssh2-global-request:
SSH2: string shift by 4 instead of by 1
SSH2: fix E_NOTICE involving global requests
make it so that the timeout in the constructor behaves in the same
way that timeout's set via setTimeout() do. eg. isTimeout() tells
you if a timeout was thrown etc.
SSH2: update conditions under which _disconnect's code is executed
* terrafrost/disconnect-fix:
SSH2: update conditions under which _disconnect's code is executed
SSH2: update conditions under which _disconnect's code is executed
* terrafrost/disconnect-fix:
SSH2: update conditions under which _disconnect's code is executed
Change copyright years from roman numeral to decimal numbers.
* bantu/fix-547:
Change copyright years from roman numeral to decimal numbers.
Conflicts:
phpseclib/System/SSH_Agent.php
the last _send_channel_packet was unnecessarily complex. this lead
to a number of problems. for example,
the window size was checked for adjustments in two places. in the
second place it receives a window adjustment packet and just assumes
that the window adjustment packet was big enough for the rest of the
data.
(thanks, pixall!)
Sometimes SSH servers will null pad their RSA keys. this null padding
broke Net/SSH2.php's RSA implementation (Crypt/RSA.php's implementation
works just fine). Also, the -3 was counting the initial "\0" of $h
twice so adjust it to -2.
it doesn't need to be defined since the strlen($this->last_interactive_response)
check in _login_helper serves the same purpose that NET_SSH_MASK_LOGIN_INTERACTIVE
was intended to serve
* master:
SSH2: white space adjustment
SSH: update getServerPublicHostKey() to use new _connect() method
SSH2: fix if statement for conditional _connect() call
simplify calls to $this->_connect()
SSH2: make it so negotiated algorithms can be seen before login
SSH2: make it so negotiated algorithms can be seen before login
* terrafrost/ssh2-show-methods-before-login:
SSH2: white space adjustment
SSH: update getServerPublicHostKey() to use new _connect() method
SSH2: fix if statement for conditional _connect() call
simplify calls to $this->_connect()
SSH2: make it so negotiated algorithms can be seen before login
This small patch adds hmac-sha2-256 support separately as requested in #423.
Some security standards now recommend to disable MD5 and SHA1, and use SHA2 instead. This change was tested using SHA2 against RHEL6's OpenSSH v5.3p1 and Solaris 11. And was also tested with RHEL5's OpenSSH 4.3p2 which doesn't include SHA2.
* master:
phpseclib_is_includable() -> phpseclib_resolve_include_path()
Drop Net_SSH2::_is_includable() method.
Random: a few changes to the stream_resolve_include_path_function
Replace stream_resolve_include_path with phpseclib_is_includable.
Random: add explanatory comment
SSH2: replace _is_includable() with stream_resolve_include_path
Random: include the Crypt_* classes if they're available
Conflicts:
tests/bootstrap.php
Random: include the Crypt_* classes if they're available
* bantu/a-random-change:
phpseclib_is_includable() -> phpseclib_resolve_include_path()
Drop Net_SSH2::_is_includable() method.
Random: a few changes to the stream_resolve_include_path_function
Replace stream_resolve_include_path with phpseclib_is_includable.
Random: add explanatory comment
SSH2: replace _is_includable() with stream_resolve_include_path
Random: include the Crypt_* classes if they're available
* master:
SSH2: rm redundant part of SSH2 unit test
SSH2: add unit test for getServerPublicHostKey
SSH2: make it so you can verify server public host key without logging on
none of the other statically defined variables have the potential
to change as multiple Net_SSH2 objects are created but this one does.
ie. if you connect to one SSH-2.0-SSHD server then no subsequent server
will use hmac-sha1-96 even if it could
* master:
SSH2: move _connect() call to _login() from login()
SSH2: phpdoc updates
SSH: clarify role of constructor / connection timeout
SSH1: do fsockopen() call when login has been called
SSH2: != -> |=
SSH2: phpdoc changes
SSH2: syntax error
SSH2: timeout set in constructor != timeout set by setTimeout()
SSH2: add phpdoc header
SSH2: connect to server in login() function
Conflicts:
phpseclib/Net/SSH2.php
Also, in Net_SSH2::_connect() $host is used in multiple places. Rather than changing all references to {$this->host}:{$this->port} preserve existing $host reference and update it accordingly
this change will make it so some parameters can be set after the
Net_SSH2 object has been created. eg. instead of doing
define('NET_SSH2_LOGGING', NET_SSH2_LOG_COMPLEX) one can now do
$ssh->setLogging(...) or something.
In logs that were provided to me phpseclib sent a packet that was 2536 bytes long (excluding the bytes denoting the channel and data length) but the length packet said it was 32764 bytes long (ie. $max_size).
So when $max_size is less than the data being sent and has to be adjusted by a new window adjust message from the server and the adjustment makes $max_Size bigger than the data being sent over problems arise.
SSH's window size has caused issues before. Overall I don't think the SSH specs really explain the window size very well. I opened up an errata on SSH's RFC a while back about the issue.