diff options
author | djm <djm> | 2002-02-05 01:19:52 +0000 |
---|---|---|
committer | djm <djm> | 2002-02-05 01:19:52 +0000 |
commit | 373dffa093787f69d57f8a4777fbff7c63afd34f (patch) | |
tree | 2011827e150ef9c9c3fd09ae7e74278fef06e0d1 /kexdh.c | |
parent | 30d404f2213fb39c330dcf744fb4c566f4caab28 (diff) | |
download | openssh-373dffa093787f69d57f8a4777fbff7c63afd34f.tar.gz |
- 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 'kexdh.c')
-rw-r--r-- | kexdh.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: kexdh.c,v 1.13 2002/01/25 22:07:40 markus Exp $"); +RCSID("$OpenBSD: kexdh.c,v 1.14 2002/01/31 13:35:11 markus Exp $"); #include <openssl/crypto.h> #include <openssl/bn.h> @@ -121,7 +121,8 @@ kexdh_client(Kex *kex) server_host_key = key_from_blob(server_host_key_blob, sbloblen); if (server_host_key == NULL) fatal("cannot decode server_host_key_blob"); - + if (server_host_key->type != kex->hostkey_type) + fatal("type mismatch for decoded server_host_key_blob"); if (kex->verify_host_key == NULL) fatal("cannot verify server_host_key"); if (kex->verify_host_key(server_host_key) == -1) |