From a88b8c8c0f591a3bfa8d7984343a27815184f495 Mon Sep 17 00:00:00 2001 From: "Jeremy T. Bouse" Date: Sun, 29 May 2011 08:16:54 -0400 Subject: Imported Upstream version 1.7.7.1 --- paramiko/kex_gex.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'paramiko/kex_gex.py') 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)) -- cgit v1.2.3