]> andersk Git - openssh.git/blobdiff - kex.c
- (djm) Merge OpenBSD changes:
[openssh.git] / kex.c
diff --git a/kex.c b/kex.c
index 68b9e522e73d96bfdc9b8c502ccb700ef7427888..2dbac9b13bdb1146e5d2670d23a94e4904c9ce9c 100644 (file)
--- a/kex.c
+++ b/kex.c
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: kex.c,v 1.12 2000/10/11 20:27:23 markus Exp $");
+RCSID("$OpenBSD: kex.c,v 1.13 2000/11/12 19:50:37 markus Exp $");
 
 #include "ssh.h"
 #include "ssh2.h"
@@ -43,6 +43,7 @@ RCSID("$OpenBSD: kex.c,v 1.12 2000/10/11 20:27:23 markus Exp $");
 #include <openssl/pem.h>
 
 #include "kex.h"
+#include "key.h"
 
 #define KEX_COOKIE_LEN 16
 
@@ -454,11 +455,12 @@ choose_kex(Kex *k, char *client, char *server)
 void
 choose_hostkeyalg(Kex *k, char *client, char *server)
 {
-       k->hostkeyalg = get_match(client, server);
-       if (k->hostkeyalg == NULL)
+       char *hostkeyalg = get_match(client, server);
+       if (hostkeyalg == NULL)
                fatal("no hostkey alg");
-       if (strcmp(k->hostkeyalg, KEX_DSS) != 0)
-               fatal("bad hostkey alg %s", k->hostkeyalg);
+       k->hostkey_type = key_type_from_name(hostkeyalg);
+       if (k->hostkey_type == KEY_UNSPEC)
+               fatal("bad hostkey alg '%s'", hostkeyalg);
 }
 
 Kex *
This page took 0.030933 seconds and 4 git commands to generate.