diff options
author | Jeremy T. Bouse <jbouse@debian.org> | 2011-05-29 08:16:54 -0400 |
---|---|---|
committer | Jeremy T. Bouse <jbouse@debian.org> | 2011-05-29 10:15:03 -0400 |
commit | be5542c05e46b500e47b94bc8a6254cae8335a8b (patch) | |
tree | 1d13e6d43698839fb5fedc9a685cc5f634b4bacf /paramiko/kex_group1.py | |
parent | 5952c8ac9aff9f0bf1fe295d9ed5c6ec1656d819 (diff) | |
download | python-paramiko-be5542c05e46b500e47b94bc8a6254cae8335a8b.tar python-paramiko-be5542c05e46b500e47b94bc8a6254cae8335a8b.tar.gz |
Imported Upstream version 1.7.7.1
Diffstat (limited to 'paramiko/kex_group1.py')
-rw-r--r-- | paramiko/kex_group1.py | 5 |
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)) |