diff options
author | Damien Miller <djm@mindrot.org> | 2002-02-05 12:19:52 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2002-02-05 12:19:52 +1100 |
commit | 9ab47eeb229761173ce5da5b4976d9ea9a7b75e4 (patch) | |
tree | 4c6a56b641c77b2d728cf6dd2f77bc1058020efb /kexgex.c | |
parent | 07a2d429b2aafe273056f71ab150456fe3ff31ef (diff) |
- markus@cvs.openbsd.org 2002/01/31 13:35:11
[kexdh.c kexgex.c]
cross check announced key type and type from key blob
Diffstat (limited to 'kexgex.c')
-rw-r--r-- | kexgex.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -24,7 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "includes.h" | 26 | #include "includes.h" |
27 | RCSID("$OpenBSD: kexgex.c,v 1.16 2002/01/25 22:07:40 markus Exp $"); | 27 | RCSID("$OpenBSD: kexgex.c,v 1.17 2002/01/31 13:35:11 markus Exp $"); |
28 | 28 | ||
29 | #include <openssl/bn.h> | 29 | #include <openssl/bn.h> |
30 | 30 | ||
@@ -176,7 +176,8 @@ kexgex_client(Kex *kex) | |||
176 | server_host_key = key_from_blob(server_host_key_blob, sbloblen); | 176 | server_host_key = key_from_blob(server_host_key_blob, sbloblen); |
177 | if (server_host_key == NULL) | 177 | if (server_host_key == NULL) |
178 | fatal("cannot decode server_host_key_blob"); | 178 | fatal("cannot decode server_host_key_blob"); |
179 | 179 | if (server_host_key->type != kex->hostkey_type) | |
180 | fatal("type mismatch for decoded server_host_key_blob"); | ||
180 | if (kex->verify_host_key == NULL) | 181 | if (kex->verify_host_key == NULL) |
181 | fatal("cannot verify server_host_key"); | 182 | fatal("cannot verify server_host_key"); |
182 | if (kex->verify_host_key(server_host_key) == -1) | 183 | if (kex->verify_host_key(server_host_key) == -1) |