summaryrefslogtreecommitdiff
path: root/paramiko/kex_gss.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-09-15 12:47:29 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2014-09-15 12:47:29 -0700
commit4e66cf36c4c97ce539970553e721d9a81727fbb5 (patch)
tree31ce41e560644027c4c0ae2f2c8c471d907d56f3 /paramiko/kex_gss.py
parentf74c7d76ec2ea9d39a4af6643761b648f81bd266 (diff)
downloadparamiko-4e66cf36c4c97ce539970553e721d9a81727fbb5.tar.gz
Use hashlib in favor of PyCrypto's hashes
Diffstat (limited to 'paramiko/kex_gss.py')
-rw-r--r--paramiko/kex_gss.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/paramiko/kex_gss.py b/paramiko/kex_gss.py
index a319b33b..4e8380ef 100644
--- a/paramiko/kex_gss.py
+++ b/paramiko/kex_gss.py
@@ -36,8 +36,8 @@ This module provides GSS-API / SSPI Key Exchange as defined in RFC 4462.
.. versionadded:: 1.15
"""
+from hashlib import sha1
-from Crypto.Hash import SHA
from paramiko.common import *
from paramiko import util
from paramiko.message import Message
@@ -196,7 +196,7 @@ class KexGSSGroup1(object):
hm.add_mpint(self.e)
hm.add_mpint(self.f)
hm.add_mpint(K)
- self.transport._set_K_H(K, SHA.new(str(hm)).digest())
+ self.transport._set_K_H(K, sha1(str(hm)).digest())
if srv_token is not None:
self.kexgss.ssh_init_sec_context(target=self.gss_host,
recv_token=srv_token)
@@ -229,7 +229,7 @@ class KexGSSGroup1(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)
srv_token = self.kexgss.ssh_accept_sec_context(self.gss_host,
client_token)
@@ -463,7 +463,7 @@ class KexGSSGex(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)
srv_token = self.kexgss.ssh_accept_sec_context(self.gss_host,
client_token)
@@ -555,7 +555,7 @@ class KexGSSGex(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)
if srv_token is not None:
self.kexgss.ssh_init_sec_context(target=self.gss_host,