diff options
Diffstat (limited to 'kex.c')
-rw-r--r-- | kex.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: kex.c,v 1.12 2000/10/11 20:27:23 markus Exp $"); | 26 | RCSID("$OpenBSD: kex.c,v 1.13 2000/11/12 19:50:37 markus Exp $"); |
27 | 27 | ||
28 | #include "ssh.h" | 28 | #include "ssh.h" |
29 | #include "ssh2.h" | 29 | #include "ssh2.h" |
@@ -43,6 +43,7 @@ RCSID("$OpenBSD: kex.c,v 1.12 2000/10/11 20:27:23 markus Exp $"); | |||
43 | #include <openssl/pem.h> | 43 | #include <openssl/pem.h> |
44 | 44 | ||
45 | #include "kex.h" | 45 | #include "kex.h" |
46 | #include "key.h" | ||
46 | 47 | ||
47 | #define KEX_COOKIE_LEN 16 | 48 | #define KEX_COOKIE_LEN 16 |
48 | 49 | ||
@@ -454,11 +455,12 @@ choose_kex(Kex *k, char *client, char *server) | |||
454 | void | 455 | void |
455 | choose_hostkeyalg(Kex *k, char *client, char *server) | 456 | choose_hostkeyalg(Kex *k, char *client, char *server) |
456 | { | 457 | { |
457 | k->hostkeyalg = get_match(client, server); | 458 | char *hostkeyalg = get_match(client, server); |
458 | if (k->hostkeyalg == NULL) | 459 | if (hostkeyalg == NULL) |
459 | fatal("no hostkey alg"); | 460 | fatal("no hostkey alg"); |
460 | if (strcmp(k->hostkeyalg, KEX_DSS) != 0) | 461 | k->hostkey_type = key_type_from_name(hostkeyalg); |
461 | fatal("bad hostkey alg %s", k->hostkeyalg); | 462 | if (k->hostkey_type == KEY_UNSPEC) |
463 | fatal("bad hostkey alg '%s'", hostkeyalg); | ||
462 | } | 464 | } |
463 | 465 | ||
464 | Kex * | 466 | Kex * |