summaryrefslogtreecommitdiff
path: root/kexecdhc.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-09-24 22:11:14 +1000
committerDamien Miller <djm@mindrot.org>2010-09-24 22:11:14 +1000
commitd5f62bf280b0798d7009d4424594a648a4e887fb (patch)
tree5f18078ea61f6c5503dc4addfb2f17d13844692c /kexecdhc.c
parent603134e077e667b4819effb0e121803842df621f (diff)
downloadopenssh-git-d5f62bf280b0798d7009d4424594a648a4e887fb.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 'kexecdhc.c')
-rw-r--r--kexecdhc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kexecdhc.c b/kexecdhc.c
index 297a0e5a..115d4bf8 100644
--- a/kexecdhc.c
+++ b/kexecdhc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexecdhc.c,v 1.1 2010/08/31 11:54:45 djm Exp $ */
+/* $OpenBSD: kexecdhc.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.
@@ -59,7 +59,8 @@ kexecdh_client(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 ((client_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(client_key) != 1)