diff options
author | Robey Pointer <robey@lag.net> | 2005-10-31 03:27:13 +0000 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2005-10-31 03:27:13 +0000 |
commit | b1d58c5cebbb1a2a847bb20045c5b981f2f99c5b (patch) | |
tree | 070888ce962ba44917ad057bbf4b98ba8e6c5d46 | |
parent | 25d55e6089dabe8ffdbb964d3220a50ab0d36213 (diff) |
[project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-76]
add a few more randpool.stir() calls
-rw-r--r-- | paramiko/dsskey.py | 3 | ||||
-rw-r--r-- | paramiko/rsakey.py | 1 | ||||
-rw-r--r-- | paramiko/transport.py | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/paramiko/dsskey.py b/paramiko/dsskey.py index 35bf08c0..2b313723 100644 --- a/paramiko/dsskey.py +++ b/paramiko/dsskey.py @@ -140,13 +140,14 @@ class DSSKey (PKey): @param bits: number of bits the generated key should be. @type bits: int @param progress_func: an optional function to call at key points in - key generation (used by C{pyCrypto.PublicKey}). + key generation (used by C{pyCrypto.PublicKey}). @type progress_func: function @return: new private key @rtype: L{DSSKey} @since: fearow """ + randpool.stir() dsa = DSA.generate(bits, randpool.get_bytes, progress_func) key = DSSKey(vals=(dsa.p, dsa.q, dsa.g, dsa.y)) key.x = dsa.x diff --git a/paramiko/rsakey.py b/paramiko/rsakey.py index 7e6b07e4..780ea1b6 100644 --- a/paramiko/rsakey.py +++ b/paramiko/rsakey.py @@ -123,6 +123,7 @@ class RSAKey (PKey): @since: fearow """ + randpool.stir() rsa = RSA.generate(bits, randpool.get_bytes, progress_func) key = RSAKey(vals=(rsa.e, rsa.n)) key.d = rsa.d diff --git a/paramiko/transport.py b/paramiko/transport.py index 9f095cbd..9609773e 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -140,7 +140,7 @@ class Transport (threading.Thread): """ _PROTO_ID = '2.0' - _CLIENT_ID = 'paramiko_1.5' + _CLIENT_ID = 'paramiko_1.5.1' _preferred_ciphers = ( 'aes128-cbc', 'blowfish-cbc', 'aes256-cbc', '3des-cbc' ) _preferred_macs = ( 'hmac-sha1', 'hmac-md5', 'hmac-sha1-96', 'hmac-md5-96' ) @@ -637,6 +637,7 @@ class Transport (threading.Thread): """ m = Message() m.add_byte(chr(MSG_IGNORE)) + randpool.stir() if bytes is None: bytes = (ord(randpool.get_bytes(1)) % 32) + 10 m.add_bytes(randpool.get_bytes(bytes)) @@ -1399,6 +1400,7 @@ class Transport (threading.Thread): else: available_server_keys = self._preferred_keys + randpool.stir() m = Message() m.add_byte(chr(MSG_KEXINIT)) m.add_bytes(randpool.get_bytes(16)) |