summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2015-01-20 20:16:21 +0000
committerDamien Miller <djm@mindrot.org>2015-01-26 23:53:56 +1100
commit57e783c8ba2c0797f93977e83b2a8644a03065d8 (patch)
treeac590a804baf8817720a49d8b1055e61e015f24e /sshd.c
parent1d6424a6ff94633c221297ae8f42d54e12a20912 (diff)
upstream commit
kex_setup errors are fatal()
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sshd.c b/sshd.c
index 3b6c10a83..6e40ba42e 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.436 2015/01/19 20:20:20 markus Exp $ */ 1/* $OpenBSD: sshd.c,v 1.437 2015/01/20 20:16:21 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2466,6 +2466,7 @@ do_ssh2_kex(void)
2466{ 2466{
2467 char *myproposal[PROPOSAL_MAX] = { KEX_SERVER }; 2467 char *myproposal[PROPOSAL_MAX] = { KEX_SERVER };
2468 struct kex *kex; 2468 struct kex *kex;
2469 int r;
2469 2470
2470 if (options.ciphers != NULL) { 2471 if (options.ciphers != NULL) {
2471 myproposal[PROPOSAL_ENC_ALGS_CTOS] = 2472 myproposal[PROPOSAL_ENC_ALGS_CTOS] =
@@ -2501,7 +2502,8 @@ do_ssh2_kex(void)
2501 list_hostkey_types()); 2502 list_hostkey_types());
2502 2503
2503 /* start key exchange */ 2504 /* start key exchange */
2504 kex_setup(active_state, myproposal); 2505 if ((r = kex_setup(active_state, myproposal)) != 0)
2506 fatal("kex_setup: %s", ssh_err(r));
2505 kex = active_state->kex; 2507 kex = active_state->kex;
2506#ifdef WITH_OPENSSL 2508#ifdef WITH_OPENSSL
2507 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; 2509 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server;