diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2013-09-20 13:58:32 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2013-09-20 13:58:32 -0700 |
commit | ea27a8bd8771b2d3db0a644f035865af45b46171 (patch) | |
tree | ee020a34a976d8660b77cc5ce1a3c31dba4931db | |
parent | db083b64784c55f2c8becf5021ad5effb0ac6d44 (diff) | |
parent | 081b04116be29072695a54e52e74ca9879bf03f9 (diff) |
Merge branch '1.11'
-rw-r--r-- | NEWS | 14 | ||||
-rw-r--r-- | paramiko/packet.py | 12 |
2 files changed, 18 insertions, 8 deletions
@@ -12,6 +12,20 @@ Issues noted as "Fabric #NN" can be found at https://github.com/fabric/fabric/. Releases ======== +v1.11.1 (20th Sep 2013) +----------------------- + +* #162: Clean up HMAC module import to avoid deadlocks in certain uses of + SSHClient. Thanks to Gernot Hillier for the catch & suggested + fix. + +v1.10.3 (20th Sep 2013) +----------------------- + +* #162: Clean up HMAC module import to avoid deadlocks in certain uses of + SSHClient. Thanks to Gernot Hillier for the catch & suggested + fix. + v1.11.0 (26th Jul 2013) ----------------------- diff --git a/paramiko/packet.py b/paramiko/packet.py index 38a6d4b5..be502e9b 100644 --- a/paramiko/packet.py +++ b/paramiko/packet.py @@ -33,17 +33,13 @@ from paramiko.ssh_exception import SSHException, ProxyCommandFailure from paramiko.message import Message -got_r_hmac = False try: - import r_hmac - got_r_hmac = True + from r_hmac import HMAC except ImportError: - pass + from Crypto.Hash.HMAC import HMAC + def compute_hmac(key, message, digest_class): - if got_r_hmac: - return r_hmac.HMAC(key, message, digest_class).digest() - from Crypto.Hash import HMAC - return HMAC.HMAC(key, message, digest_class).digest() + return HMAC(key, message, digest_class).digest() class NeedRekeyException (Exception): |