summaryrefslogtreecommitdiffhomepage
path: root/kex_group1.py
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2003-11-10 08:49:50 +0000
committerRobey Pointer <robey@lag.net>2003-11-10 08:49:50 +0000
commit11815d4d837314a51ebf919c1a61cb0f68a3c02b (patch)
treea87cdf5a7f3658375d0d6be642a5d8ddf46bbc36 /kex_group1.py
parent2ff9f467517e1ff8916e1adbdaf342d0468b4ebb (diff)
[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-9]
rename secsh -> paramiko also, rename SecshException back to SSHException. sigh. :)
Diffstat (limited to 'kex_group1.py')
-rw-r--r--kex_group1.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/kex_group1.py b/kex_group1.py
index ab16ee4e..b507d88f 100644
--- a/kex_group1.py
+++ b/kex_group1.py
@@ -5,7 +5,7 @@
# "g" generator.
from message import Message, inflate_long
-from secsh import SecshException
+from paramiko import SSHException
from transport import MSG_NEWKEYS
from Crypto.Hash import SHA
from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL
@@ -59,14 +59,14 @@ class KexGroup1(object):
return self.parse_kexdh_init(m)
elif not self.transport.server_mode and (ptype == MSG_KEXDH_REPLY):
return self.parse_kexdh_reply(m)
- raise SecshException('KexGroup1 asked to handle packet type %d' % ptype)
+ raise SSHException('KexGroup1 asked to handle packet type %d' % ptype)
def parse_kexdh_reply(self, m):
# client mode
host_key = m.get_string()
self.f = m.get_mpint()
if (self.f < 1) or (self.f > P - 1):
- raise SecshException('Server kex "f" is out of range')
+ raise SSHException('Server kex "f" is out of range')
sig = m.get_string()
K = pow(self.f, self.x, P)
# okay, build up the hash H of (V_C || V_S || I_C || I_S || K_S || e || f || K)
@@ -82,7 +82,7 @@ class KexGroup1(object):
# server mode
self.e = m.get_mpint()
if (self.e < 1) or (self.e > P - 1):
- raise SecshException('Client kex "e" is out of range')
+ raise SSHException('Client kex "e" is out of range')
K = pow(self.e, self.x, P)
key = str(self.transport.get_server_key())
# okay, build up the hash H of (V_C || V_S || I_C || I_S || K_S || e || f || K)