Merge branch '1.10' into 168-int

Conflicts:
	NEWS
	setup.py
This commit is contained in:
Jeff Forcier 2013-09-20 14:39:55 -07:00
commit 02387fc88c
4 changed files with 19 additions and 29 deletions

30
NEWS
View File

@ -12,28 +12,20 @@ Issues noted as "Fabric #NN" can be found at https://github.com/fabric/fabric/.
Releases Releases
======== ========
v1.11.0 (DD MM YYYY) v1.10.3 (20th Sep 2013)
-------------------- -----------------------
* #98: On Windows, when interacting with the PuTTY PAgeant, Paramiko now * #162: Clean up HMAC module import to avoid deadlocks in certain uses of
creates the shared memory map with explicit Security Attributes of the user, SSHClient. Thanks to Gernot Hillier for the catch & suggested
which is the same technique employed by the canonical PuTTY library to avoid fix.
permissions issues when Paramiko is running under a different UAC context * #36: Fix the port-forwarding demo to avoid file descriptor errors. Thanks to
than the PuTTY Ageant process. Thanks to Jason R. Coombs for the patch. Jonathan Halcrow for catch & patch.
* #100: Remove use of PyWin32 in `win_pageant` module. Module was already
dependent on ctypes for constructing appropriate structures and had ctypes
implementations of all functionality. Thanks to Jason R. Coombs for the
patch.
* #87: Ensure updates to `known_hosts` files account for any updates to said
files after Paramiko initially read them. (Includes related fix to guard
against duplicate entries during subsequent `known_hosts` loads.) Thanks to
`@sunweaver` for the contribution.
v1.10.2 (DD MM 2013) v1.10.2 (26th Jul 2013)
-------------------- -----------------------
* #153, #67: Warn on parse failure when reading known_hosts * #153, #67: Warn on parse failure when reading known_hosts file. Thanks to
file. Thanks to `@glasserc` for patch. `@glasserc` for patch.
* #146: Indentation fixes for readability. Thanks to Abhinav Upadhyay for catch * #146: Indentation fixes for readability. Thanks to Abhinav Upadhyay for catch
& patch. & patch.

View File

@ -78,9 +78,11 @@ class Handler (SocketServer.BaseRequestHandler):
if len(data) == 0: if len(data) == 0:
break break
self.request.send(data) self.request.send(data)
peername = self.request.getpeername()
chan.close() chan.close()
self.request.close() self.request.close()
verbose('Tunnel closed from %r' % (self.request.getpeername(),)) verbose('Tunnel closed from %r' % (peername,))
def forward_tunnel(local_port, remote_host, remote_port, transport): def forward_tunnel(local_port, remote_host, remote_port, transport):

View File

@ -55,7 +55,7 @@ if sys.version_info < (2, 5):
__author__ = "Jeff Forcier <jeff@bitprophet.org>" __author__ = "Jeff Forcier <jeff@bitprophet.org>"
__version__ = "1.10.1" __version__ = "1.10.2"
__license__ = "GNU Lesser General Public License (LGPL)" __license__ = "GNU Lesser General Public License (LGPL)"

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):