diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-04-14 10:56:05 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-04-14 10:56:05 -0400 |
commit | 191fd465f166588922ccbf08b65d4479d8520d6a (patch) | |
tree | 673a3ad36d919009d2621b6e1d3b102cf7988aa9 /paramiko/kex_group1.py | |
parent | 6c6969c1882e62d6249264d2df46ff452eb53e7e (diff) | |
parent | fa86d655dc8f08eb9171930c41b508e2bee08b08 (diff) | |
download | paramiko-191fd465f166588922ccbf08b65d4479d8520d6a.tar.gz |
Merge branch 'master' into use-urandom
Conflicts:
paramiko/dsskey.py
paramiko/ecdsakey.py
paramiko/hostkeys.py
paramiko/kex_gex.py
paramiko/kex_group1.py
paramiko/pkey.py
paramiko/primes.py
paramiko/rsakey.py
tests/test_pkey.py
Diffstat (limited to 'paramiko/kex_group1.py')
-rw-r--r-- | paramiko/kex_group1.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/paramiko/kex_group1.py b/paramiko/kex_group1.py index bc88202c..7ccceea6 100644 --- a/paramiko/kex_group1.py +++ b/paramiko/kex_group1.py @@ -22,8 +22,7 @@ Standard SSH key exchange ("kex" if you wanna sound cool). Diffie-Hellman of """ import os - -from Crypto.Hash import SHA +from hashlib import sha1 from paramiko import util from paramiko.common import max_byte, zero_byte @@ -107,7 +106,7 @@ class KexGroup1(object): hm.add_mpint(self.e) hm.add_mpint(self.f) hm.add_mpint(K) - self.transport._set_K_H(K, SHA.new(hm.asbytes()).digest()) + self.transport._set_K_H(K, sha1(hm.asbytes()).digest()) self.transport._verify_key(host_key, sig) self.transport._activate_outbound() @@ -126,7 +125,7 @@ class KexGroup1(object): hm.add_mpint(self.e) hm.add_mpint(self.f) hm.add_mpint(K) - H = SHA.new(hm.asbytes()).digest() + H = sha1(hm.asbytes()).digest() self.transport._set_K_H(K, H) # sign it sig = self.transport.get_server_key().sign_ssh_data(H) |