summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorgshaanan <guy.shaanan@alcatel-lucent.com>2015-10-15 13:51:12 +0300
committergshaanan <guy.shaanan@alcatel-lucent.com>2015-10-15 13:51:12 +0300
commit53e91cc449ff3070cd57af2ed317a17a47d378e1 (patch)
tree6efc88c740d55cad34fb6127c2309dcb39298a9b
parentb3b0f2d0dff3aef736128935302aeb6adb1ee020 (diff)
This adds SHA-256 support based on a fork of 'zamiam69:add_sha2_support'.
This commit fixes the problem with the fork where you can't connect using SHA1 anymore. The fix changes the '_preferred_macs' and '_preferred_kex' order.
-rw-r--r--paramiko/transport.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py
index 9009f9f5..5ab5ac95 100644
--- a/paramiko/transport.py
+++ b/paramiko/transport.py
@@ -96,13 +96,13 @@ class Transport (threading.Thread, ClosingContextManager):
_preferred_ciphers = ('aes128-ctr', 'aes256-ctr', 'aes128-cbc', 'blowfish-cbc',
'aes256-cbc', '3des-cbc', 'arcfour128', 'arcfour256')
- _preferred_macs = ('hmac-sha1', 'hmac-md5', 'hmac-sha1-96', 'hmac-md5-96',
- 'hmac-sha2-256')
+ _preferred_macs = ('hmac-sha2-256', 'hmac-md5', 'hmac-sha1-96', 'hmac-md5-96',
+ 'hmac-sha1')
_preferred_keys = ('ssh-rsa', 'ssh-dss', 'ecdsa-sha2-nistp256')
- _preferred_kex = ('diffie-hellman-group-exchange-sha256',
+ _preferred_kex = ('diffie-hellman-group1-sha1',
'diffie-hellman-group14-sha1',
- 'diffie-hellman-group-exchange-sha1' ,
- 'diffie-hellman-group1-sha1')
+ 'diffie-hellman-group-exchange-sha1' ,
+ 'diffie-hellman-group-exchange-sha256')
_preferred_compression = ('none',)
_cipher_info = {