summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/kex.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2007-06-05 06:52:38 +0000
committerDamien Miller <djm@cvs.openbsd.org>2007-06-05 06:52:38 +0000
commit18ea03300bf87ecf324f5a4fee9047441bbedd76 (patch)
treeb4ac81bd81e9365aabf10cd980d4be7059d70fd4 /usr.bin/ssh/kex.c
parent57ad15a57f4291b6559376688db9e350380af27f (diff)
Preserve MAC ctx between packets, saving 2xhash calls per-packet.
Yields around a 12-16% end-to-end speedup for arcfour256/hmac-md5 patch from markus@ tested dtucker@ and myself, ok markus@ and me (I'm committing at his request)
Diffstat (limited to 'usr.bin/ssh/kex.c')
-rw-r--r--usr.bin/ssh/kex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/kex.c b/usr.bin/ssh/kex.c
index 00d3df84f78..28206467ff3 100644
--- a/usr.bin/ssh/kex.c
+++ b/usr.bin/ssh/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.78 2007/05/30 05:58:13 djm Exp $ */
+/* $OpenBSD: kex.c,v 1.79 2007/06/05 06:52:37 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
*
@@ -270,7 +270,7 @@ choose_mac(Mac *mac, char *client, char *server)
if (name == NULL)
fatal("no matching mac found: client %s server %s",
client, server);
- if (mac_init(mac, name) < 0)
+ if (mac_setup(mac, name) < 0)
fatal("unsupported mac %s", name);
/* truncate the key */
if (datafellows & SSH_BUG_HMAC)