summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/sshd.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2015-01-20 20:16:22 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2015-01-20 20:16:22 +0000
commita49798d277e8574a472b3c82106cd02ad18cc67e (patch)
tree87f337a13aead8ca7f5a7f937668e5b9743dc143 /usr.bin/ssh/sshd.c
parent19d21c70deae029fcf1f2cbf01397fbd4d37f885 (diff)
kex_setup errors are fatal()
Diffstat (limited to 'usr.bin/ssh/sshd.c')
-rw-r--r--usr.bin/ssh/sshd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index 910dd9cb49c..d318851411e 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.436 2015/01/19 20:20:20 markus Exp $ */
+/* $OpenBSD: sshd.c,v 1.437 2015/01/20 20:16:21 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2292,6 +2292,7 @@ do_ssh2_kex(void)
{
char *myproposal[PROPOSAL_MAX] = { KEX_SERVER };
struct kex *kex;
+ int r;
if (options.ciphers != NULL) {
myproposal[PROPOSAL_ENC_ALGS_CTOS] =
@@ -2327,7 +2328,8 @@ do_ssh2_kex(void)
list_hostkey_types());
/* start key exchange */
- kex_setup(active_state, myproposal);
+ if ((r = kex_setup(active_state, myproposal)) != 0)
+ fatal("kex_setup: %s", ssh_err(r));
kex = active_state->kex;
#ifdef WITH_OPENSSL
kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server;