summaryrefslogtreecommitdiff
path: root/paramiko/kex_gex.py
diff options
context:
space:
mode:
authorJeremy T. Bouse <jbouse@debian.org>2011-05-29 08:16:54 -0400
committerJeremy T. Bouse <jbouse@debian.org>2011-05-29 08:16:54 -0400
commita88b8c8c0f591a3bfa8d7984343a27815184f495 (patch)
tree85986bed44cc7148c461d6aa7736b627b83c24fb /paramiko/kex_gex.py
parente299181a5dda25aed4879ebcbe1359604448b3ae (diff)
downloadpython-paramiko-a88b8c8c0f591a3bfa8d7984343a27815184f495.tar
python-paramiko-a88b8c8c0f591a3bfa8d7984343a27815184f495.tar.gz
Imported Upstream version 1.7.7.1upstream/1.7.7.1
Diffstat (limited to 'paramiko/kex_gex.py')
-rw-r--r--paramiko/kex_gex.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/paramiko/kex_gex.py b/paramiko/kex_gex.py
index c6be638..9c98339 100644
--- a/paramiko/kex_gex.py
+++ b/paramiko/kex_gex.py
@@ -101,8 +101,7 @@ class KexGex (object):
qhbyte <<= 1
qmask >>= 1
while True:
- self.transport.randpool.stir()
- x_bytes = self.transport.randpool.get_bytes(bytes)
+ x_bytes = self.transport.rng.read(bytes)
x_bytes = chr(ord(x_bytes[0]) & qmask) + x_bytes[1:]
x = util.inflate_long(x_bytes, 1)
if (x > 1) and (x < q):
@@ -207,7 +206,7 @@ class KexGex (object):
H = SHA.new(str(hm)).digest()
self.transport._set_K_H(K, H)
# sign it
- sig = self.transport.get_server_key().sign_ssh_data(self.transport.randpool, H)
+ sig = self.transport.get_server_key().sign_ssh_data(self.transport.rng, H)
# send reply
m = Message()
m.add_byte(chr(_MSG_KEXDH_GEX_REPLY))