FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Added key exchange types. Added function for setting integer option t… by pkittenis · Pull Request #101 · ParallelSSH/ssh-python · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) .py  (1) .pyx  (1) .rst  (1) All 4 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
3 changes: 3 additions & 0 deletions Changelog.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Changes
* Added private key file formats to `ssh.key` and `ssh.key.Key.export_privkey_file_format` for exporting private key
file with specified format - #96
* Added `ssh.channel.Channel.get_exit_status` implementation and tests.
* Added key exchange types under `ssh.session`.
* Added `ssh.session.Session.options_set_int_val` for setting an integer value `libssh` option - for example
compression level.


Packaging
Expand Down
15 changes: 15 additions & 0 deletions ci/integration_tests/test_session.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,18 @@ def test_set_timeout(self):
def test_get_server_publickey(self):
self.session.connect()
self.assertIsInstance(self.session.get_server_publickey(), SSHKey)

def test_compression_connect(self):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((self.host, self.port))
session = Session()
session.options_set(options.USER, self.user)
session.options_set(options.HOST, self.host)
session.options_set_port(self.port)
# Great API, "yes" "no" as booleans
self.assertEqual(session.options_set(options.COMPRESSION, "yes"), 0)
self.assertEqual(session.options_set_int_val(options.COMPRESSION_LEVEL, 2), 0)
self.assertEqual(session.set_socket(sock), 0)
self.assertEqual(session.connect(), 0)
self.assertEqual(
session.userauth_publickey(self.pkey), 0)
Loading

Back | FazBrowse Home | New Git URL