summaryrefslogtreecommitdiffstats
path: root/kexecdhc.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-04-23 11:24:32 +0200
committerDamien Miller <djm@mindrot.org>2013-04-23 11:24:32 +0200
commitea11119eee3c5e2429b1f5f8688b25b028fa991a (patch)
tree5916295fcefb8665088f59a5431cb0c792fbf327 /kexecdhc.c
parent - djm@cvs.openbsd.org 2013/04/19 01:03:01 (diff)
downloadopenssh-ea11119eee3c5e2429b1f5f8688b25b028fa991a.tar.xz
openssh-ea11119eee3c5e2429b1f5f8688b25b028fa991a.zip
- djm@cvs.openbsd.org 2013/04/19 01:06:50
[authfile.c cipher.c cipher.h kex.c kex.h kexecdh.c kexecdhc.c kexecdhs.c] [key.c key.h mac.c mac.h packet.c ssh.1 ssh.c] add the ability to query supported ciphers, MACs, key type and KEX algorithms to ssh. Includes some refactoring of KEX and key type handling to be table-driven; ok markus@
Diffstat (limited to 'kexecdhc.c')
-rw-r--r--kexecdhc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/kexecdhc.c b/kexecdhc.c
index 115d4bf83..04239a471 100644
--- a/kexecdhc.c
+++ b/kexecdhc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexecdhc.c,v 1.2 2010/09/22 05:01:29 djm Exp $ */
+/* $OpenBSD: kexecdhc.c,v 1.3 2013/04/19 01:06:50 djm Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2010 Damien Miller. All rights reserved.
@@ -57,11 +57,8 @@ kexecdh_client(Kex *kex)
u_char *server_host_key_blob = NULL, *signature = NULL;
u_char *kbuf, *hash;
u_int klen, slen, sbloblen, hashlen;
- int curve_nid;
- 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)
+ if ((client_key = EC_KEY_new_by_curve_name(kex->ec_nid)) == NULL)
fatal("%s: EC_KEY_new_by_curve_name failed", __func__);
if (EC_KEY_generate_key(client_key) != 1)
fatal("%s: EC_KEY_generate_key failed", __func__);