summaryrefslogtreecommitdiff
path: root/kexecdhs.c
diff options
context:
space:
mode:
authordjm <djm>2010-09-24 12:11:14 +0000
committerdjm <djm>2010-09-24 12:11:14 +0000
commitb94d6d23e18de0c96fc879a55b0038f3439b6445 (patch)
tree589d4e7cae3b6a985221bb44594bffd71967a542 /kexecdhs.c
parent3ce5229f5979266ffc973d85773e27643bd799a3 (diff)
downloadopenssh-b94d6d23e18de0c96fc879a55b0038f3439b6445.tar.gz
- djm@cvs.openbsd.org 2010/09/22 05:01:30
[kex.c kex.h kexecdh.c kexecdhc.c kexecdhs.c readconf.c readconf.h] [servconf.c servconf.h ssh_config.5 sshconnect2.c sshd.c sshd_config.5] add a KexAlgorithms knob to the client and server configuration to allow selection of which key exchange methods are used by ssh(1) and sshd(8) and their order of preference. ok markus@
Diffstat (limited to 'kexecdhs.c')
-rw-r--r--kexecdhs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kexecdhs.c b/kexecdhs.c
index d2c3feb0..8c515dfa 100644
--- a/kexecdhs.c
+++ b/kexecdhs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexecdhs.c,v 1.1 2010/08/31 11:54:45 djm Exp $ */
+/* $OpenBSD: kexecdhs.c,v 1.2 2010/09/22 05:01:29 djm Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2010 Damien Miller. All rights reserved.
@@ -61,7 +61,8 @@ kexecdh_server(Kex *kex)
u_int klen, slen, sbloblen, hashlen;
int curve_nid;
- curve_nid = kex_ecdh_name_to_nid(kex->name);
+ if ((curve_nid = kex_ecdh_name_to_nid(kex->name)) == -1)
+ fatal("%s: unsupported ECDH curve \"%s\"", __func__, kex->name);
if ((server_key = EC_KEY_new_by_curve_name(curve_nid)) == NULL)
fatal("%s: EC_KEY_new_by_curve_name failed", __func__);
if (EC_KEY_generate_key(server_key) != 1)