aboutsummaryrefslogtreecommitdiff
path: root/paramiko/kex_group1.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_group1.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_group1.py')
-rw-r--r--paramiko/kex_group1.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/paramiko/kex_group1.py b/paramiko/kex_group1.py
index 4228dd9..1386cf3 100644
--- a/paramiko/kex_group1.py
+++ b/paramiko/kex_group1.py
@@ -79,8 +79,7 @@ class KexGroup1(object):
# potential x where the first 63 bits are 1, because some of those will be
# larger than q (but this is a tiny tiny subset of potential x).
while 1:
- self.transport.randpool.stir()
- x_bytes = self.transport.randpool.get_bytes(128)
+ x_bytes = self.transport.rng.read(128)
x_bytes = chr(ord(x_bytes[0]) & 0x7f) + x_bytes[1:]
if (x_bytes[:8] != '\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF') and \
(x_bytes[:8] != '\x00\x00\x00\x00\x00\x00\x00\x00'):
@@ -125,7 +124,7 @@ class KexGroup1(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_REPLY))