From 36d6d95dc6db1f47d187b87ab1c1a10c1d30558f Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Sun, 28 Dec 2003 03:20:42 +0000 Subject: [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-16] hook up server-side kex-gex; add more documentation group-exchange kex should work now on the server side. it will only be advertised if a "moduli" file has been loaded (see the -gasp- docs) so we don't spend hours (literally. hours.) computing primes. some of the logic was previously wrong, too, since it had never been tested. fixed repr() string for Transport/BaseTransport. moved is_authenticated to Transport where it belongs. added lots of documentation (but still only about 10% documented). lots of methods were made private finally. --- demo_server.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'demo_server.py') diff --git a/demo_server.py b/demo_server.py index 90ab9bac..e04c8027 100755 --- a/demo_server.py +++ b/demo_server.py @@ -70,6 +70,11 @@ print 'Got a connection!' try: event = threading.Event() t = ServerTransport(client) + try: + t.load_server_moduli() + except: + print '(Failed to load moduli -- gex will be unsupported.)' + raise t.add_server_key(host_key) t.ultra_debug = 0 t.start_server(event) @@ -81,10 +86,11 @@ try: # print repr(t) # wait for auth - chan = t.accept(10) + chan = t.accept(20) if chan is None: print '*** No channel.' sys.exit(1) + print 'Authenticated!' chan.event.wait(10) if not chan.event.isSet(): print '*** Client never asked for a shell.' -- cgit v1.2.3