summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/kexdh.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-06-23 02:34:34 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-06-23 02:34:34 +0000
commitd497a464cee4eb42110a471f5750a880ed238ab2 (patch)
tree3a76ffa9bf1762ce24e82b27617674235a32b45f /usr.bin/ssh/kexdh.c
parentaaeec83f2d44736ab635a647a44d3e70d7110dd9 (diff)
get rid of known_hosts2, use it for hostkey lookup, but do not modify.
Diffstat (limited to 'usr.bin/ssh/kexdh.c')
-rw-r--r--usr.bin/ssh/kexdh.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/ssh/kexdh.c b/usr.bin/ssh/kexdh.c
index 40eccf6c23b..d7f90b756c9 100644
--- a/usr.bin/ssh/kexdh.c
+++ b/usr.bin/ssh/kexdh.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: kexdh.c,v 1.4 2001/06/07 20:23:04 markus Exp $");
+RCSID("$OpenBSD: kexdh.c,v 1.5 2001/06/23 02:34:29 markus Exp $");
#include <openssl/crypto.h>
#include <openssl/bn.h>
@@ -123,9 +123,10 @@ kexdh_client(Kex *kex)
if (server_host_key == NULL)
fatal("cannot decode server_host_key_blob");
- if (kex->check_host_key == NULL)
- fatal("cannot check server_host_key");
- kex->check_host_key(server_host_key);
+ if (kex->verify_host_key == NULL)
+ fatal("cannot verify server_host_key");
+ if (kex->verify_host_key(server_host_key) == -1)
+ fatal("server_host_key verification failed");
/* DH paramter f, server public DH key */
dh_server_pub = BN_new();