summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-02-20 13:53:34 -0800
committerJeff Forcier <jeff@bitprophet.org>2017-02-20 13:53:34 -0800
commit3fa1393e0c99f58743f4e4bcbcf64565ba3555b7 (patch)
tree2343e4c72946518754aa85032d180d9ab1f5799d
parent4ee756c311e31b8ba30b84829116e98ef4ffc9af (diff)
parent2914030fcf5216bc5a548ff4dca5c623e99f1e0e (diff)
Merge branch '1.17' into 1.18
-rw-r--r--paramiko/message.py16
-rw-r--r--paramiko/transport.py2
-rw-r--r--sites/www/changelog.rst5
3 files changed, 8 insertions, 15 deletions
diff --git a/paramiko/message.py b/paramiko/message.py
index bf4c6b95..05c1dd4c 100644
--- a/paramiko/message.py
+++ b/paramiko/message.py
@@ -144,9 +144,6 @@ class Message (object):
def get_int(self):
"""
Fetch an int from the stream.
-
- @return: a 32-bit unsigned integer.
- @rtype: int
"""
return struct.unpack('>I', self.get_bytes(4))[0]
@@ -176,24 +173,15 @@ class Message (object):
def get_text(self):
"""
- Fetch a string from the stream. This could be a byte string and may
- contain unprintable characters. (It's not unheard of for a string to
- contain another byte-stream Message.)
-
- @return: a string.
- @rtype: string
+ Fetch a Unicode string from the stream.
"""
- return u(self.get_bytes(self.get_int()))
- #return self.get_bytes(self.get_size())
+ return u(self.get_string())
def get_binary(self):
"""
Fetch a string from the stream. This could be a byte string and may
contain unprintable characters. (It's not unheard of for a string to
contain another byte-stream Message.)
-
- @return: a string.
- @rtype: string
"""
return self.get_bytes(self.get_int())
diff --git a/paramiko/transport.py b/paramiko/transport.py
index 8eaa094a..b286fc5c 100644
--- a/paramiko/transport.py
+++ b/paramiko/transport.py
@@ -1667,7 +1667,7 @@ class Transport (threading.Thread, ClosingContextManager):
elif name.endswith("-ctr"):
# CTR modes, we need a counter
counter = Counter.new(nbits=self._cipher_info[name]['block-size'] * 8, initial_value=util.inflate_long(iv, True))
- return self._cipher_info[name]['class'].new(key, self._cipher_info[name]['mode'], iv, counter)
+ return self._cipher_info[name]['class'].new(key, self._cipher_info[name]['mode'], '', counter)
else:
return self._cipher_info[name]['class'].new(key, self._cipher_info[name]['mode'], iv)
diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst
index 8286baa9..22695a85 100644
--- a/sites/www/changelog.rst
+++ b/sites/www/changelog.rst
@@ -2,6 +2,11 @@
Changelog
=========
+* :bug:`713 (<2.0)` (via :issue:`714` and :issue:`889`) Don't pass
+ initialization vectors to PyCrypto when dealing with counter-mode ciphers;
+ newer PyCrypto versions throw an exception otherwise (older ones simply
+ ignored this parameter altogether). Thanks to ``@jmh045000`` for report &
+ patches.
* :bug:`895` Fix a bug in server-mode concerning multiple interactive auth
steps (which were incorrectly responded to). Thanks to Dennis Kaarsemaker for
catch & patch.