summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/kexecdhc.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2013-04-19 01:06:51 +0000
committerDamien Miller <djm@cvs.openbsd.org>2013-04-19 01:06:51 +0000
commit2d1a71e8668037c9dc97579facbdf1b1042e7112 (patch)
tree43af763cab2c05c6d68a99d8d0039eb94d6ee8eb /usr.bin/ssh/kexecdhc.c
parent697840420b88c4555866280c123a7b6770447e97 (diff)
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 'usr.bin/ssh/kexecdhc.c')
-rw-r--r--usr.bin/ssh/kexecdhc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/ssh/kexecdhc.c b/usr.bin/ssh/kexecdhc.c
index 218768ba8ad..cb409d6c9d2 100644
--- a/usr.bin/ssh/kexecdhc.c
+++ b/usr.bin/ssh/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.
@@ -53,11 +53,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__);