Merge branch '1.10' into 1.11

Conflicts:
	NEWS
This commit is contained in:
Jeff Forcier 2013-09-20 13:45:18 -07:00
commit 0355672721
2 changed files with 11 additions and 8 deletions

7
NEWS
View File

@ -12,6 +12,13 @@ Issues noted as "Fabric #NN" can be found at https://github.com/fabric/fabric/.
Releases Releases
======== ========
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) v1.11.0 (26th Jul 2013)
----------------------- -----------------------

View File

@ -33,17 +33,13 @@ from paramiko.ssh_exception import SSHException, ProxyCommandFailure
from paramiko.message import Message from paramiko.message import Message
got_r_hmac = False
try: try:
import r_hmac from r_hmac import HMAC
got_r_hmac = True
except ImportError: except ImportError:
pass from Crypto.Hash.HMAC import HMAC
def compute_hmac(key, message, digest_class): def compute_hmac(key, message, digest_class):
if got_r_hmac: return HMAC(key, message, digest_class).digest()
return r_hmac.HMAC(key, message, digest_class).digest()
from Crypto.Hash import HMAC
return HMAC.HMAC(key, message, digest_class).digest()
class NeedRekeyException (Exception): class NeedRekeyException (Exception):