summaryrefslogtreecommitdiff
path: root/usr/src/cmd/ssh/libssh/common/kex.c
diff options
context:
space:
mode:
authorJan Pechanec <Jan.Pechanec@Sun.COM>2009-04-28 03:40:41 -0700
committerJan Pechanec <Jan.Pechanec@Sun.COM>2009-04-28 03:40:41 -0700
commit8caf082f3daf088f1c2d8d364a3bd1af21c1c770 (patch)
treead1d98b0745b27cc3ed284c1b1a718380ea44459 /usr/src/cmd/ssh/libssh/common/kex.c
parent26594249d18446b4a5ff8ff6d34611c718757251 (diff)
downloadillumos-gate-8caf082f3daf088f1c2d8d364a3bd1af21c1c770.tar.gz
6616927 preserve MAC contexts between packets
Diffstat (limited to 'usr/src/cmd/ssh/libssh/common/kex.c')
-rw-r--r--usr/src/cmd/ssh/libssh/common/kex.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/src/cmd/ssh/libssh/common/kex.c b/usr/src/cmd/ssh/libssh/common/kex.c
index 7bdf80c463..2df031eb33 100644
--- a/usr/src/cmd/ssh/libssh/common/kex.c
+++ b/usr/src/cmd/ssh/libssh/common/kex.c
@@ -374,8 +374,9 @@ choose_mac(Mac *mac, char *client, char *server)
{
char *name = match_list(client, server, NULL);
if (name == NULL)
- fatal("no matching mac found: client %s server %s", client, server);
- if (mac_init(mac, name) < 0)
+ fatal("no matching mac found: client %s server %s",
+ client, server);
+ if (mac_setup(mac, name) < 0)
fatal("unsupported mac %s", name);
/* truncate the key */
if (datafellows & SSH_BUG_HMAC)
@@ -384,6 +385,7 @@ choose_mac(Mac *mac, char *client, char *server)
mac->key = NULL;
mac->enabled = 0;
}
+
static void
choose_comp(Comp *comp, char *client, char *server)
{
@@ -399,6 +401,7 @@ choose_comp(Comp *comp, char *client, char *server)
}
comp->name = name;
}
+
static void
choose_kex(Kex *k, char *client, char *server)
{
@@ -418,6 +421,7 @@ choose_kex(Kex *k, char *client, char *server)
} else
fatal("bad kex alg %s", k->name);
}
+
static void
choose_hostkeyalg(Kex *k, char *client, char *server)
{