16 Commits

Author SHA1 Message Date
Andreas Treichel
eec58e1271 Update test for ssh2_auth_pubkey 2021-05-30 04:14:43 +02:00
Andreas Treichel
e690abe9e7 Add ssh2_auth_pubkey to allow public and private keys as strings 2021-05-27 23:46:21 +02:00
Casper Langemeijer
cd6eae40e4 Merge pull request #50: Fix line ending in test case when running on Windows 2021-02-24 22:05:28 +01:00
Casper Langemeijer
1432b041e7 Merge pull request #47: Fix #63480: Warning on using the SSH2 Session resource in the uri 2021-02-24 22:03:19 +01:00
Christoph M. Becker
d658eb81d4 Fix another test case with the same issue
Sorry, didn't notice that earlier due to bug #80729.
2021-02-10 19:07:16 +01:00
Christoph M. Becker
0173ac4e95 Fix line ending in test case when running on Windows
This test case executes `cat` and uses `PHP_EOL` as line ending.  This
causes the test to fail when executed on Windows connected to a Linux
SSH server.  Since `cat` is usually not available on Windows, running
the test would fail if a Windows SSH server was used.  Thus, we can
easily fix this by always using LF.
2021-02-10 17:46:13 +01:00
Christoph M. Becker
99c8c49eb4 Fix #63480: Warning on using the SSH2 Session resource in the uri
There is no need to warn if an SSH2 Session resource is given, so we
suppress the potential warning by passing NULL as `resource_type_name`.
2021-02-09 16:29:29 +01:00
Christoph M. Becker
9fb1cf84f0 Fix #79631: SSH disconnect segfault with SFTP (assertion failed)
If the SSH2 Session resource has already been closed, the libssh2
session has been as well, and the `LIBSSH2_SESSION*` has been set NULL.
If that is the case, we must not call `libssh2_sftp_shutdown()`.
2021-02-09 14:48:43 +01:00
Casper Langemeijer
ddf6047666 Merge pull request #45: Add ssh2_send_eof function 2020-12-31 16:57:13 +01:00
Calvin Buckley
9ec2b7672c Test case for php_send_eof 2020-10-30 12:45:25 -03:00
Robert Wolf
e5fa5274d9 Implementing PHP stream cast function for SSH channel objects for stream_select support. Adding test case for stream_select functionality. 2020-01-08 16:16:05 -06:00
Mitch Hagstrand
409a70543d Add test for ssh key based authentication 2017-03-08 04:45:19 -06:00
Mitch Hagstrand
c4e70dcc8b Bug73410: Adding a test to show bug 73410 is fixed 2017-02-09 01:19:24 -08:00
Mitch Hagstrand
62d00b340f BUG_73819: call ssh2_shell() causes segment fault
1. php_ssh2_shell_open() was calling zend_hash_get_current_key_ex
2. php_ssh2_exec_command() / php_ssh2_shell_open() / php_ssh2_direct_tcpip()
   were being passed a pointer instead of the resource ID.
3. Renamed session_rsrc to session_rsrcid
3. Added test for ssh2_shell and reading / writing to the stream
2017-02-06 20:29:23 +01:00
Sara Golemon
dfc51a8f20 Fix typo in sftp SKIPIF sections
Bugfix https://bugs.php.net/bug.php?id=73042

skipif function defined with one name, but called with another.
2016-09-07 21:05:49 -07:00
Sara Golemon
faa3a1fe97 Add some unit tests
Since these all need a test ssh server to connect to,
you'll need to set some environment variables.

TEST_SSH2_HOSTNAME - Where to connect to
TEST_SSH2_PORT     - Port (default: 22)
TEST_SSH2_USER     - Login as (default: getenv('USER'))
TEST_SSH2_AUTH     - Mode of authentication ('none', 'password', 'agent')
TEST_SSH2_PASS     - Password to authenticate with
TEST_SSH2_TEMPDIR  - Where to store temporary files on the remote filesystem
                     (default: /tmp )
2013-03-03 07:48:44 -08:00