summaryrefslogtreecommitdiff
path: root/kexecdh.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2013-09-14 15:43:03 +0100
committerColin Watson <cjwatson@debian.org>2013-09-14 15:43:03 +0100
commit8faf8c84430cf3c19705b1d9f8889d256e7fd1fd (patch)
treee6cb74192adb00fda5e4d1457547851d7e0d86af /kexecdh.c
parent328b60656f29db6306994d7498dede386ec2d1c3 (diff)
parentc41345ad7ee5a22689e2c009595e85fa27b4b39a (diff)
merge 6.3p1
Diffstat (limited to 'kexecdh.c')
-rw-r--r--kexecdh.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/kexecdh.c b/kexecdh.c
index f13f69d3b..c948fe20a 100644
--- a/kexecdh.c
+++ b/kexecdh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kexecdh.c,v 1.3 2010/09/22 05:01:29 djm Exp $ */ 1/* $OpenBSD: kexecdh.c,v 1.4 2013/04/19 01:06:50 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * Copyright (c) 2010 Damien Miller. All rights reserved. 4 * Copyright (c) 2010 Damien Miller. All rights reserved.
@@ -45,24 +45,6 @@
45#include "kex.h" 45#include "kex.h"
46#include "log.h" 46#include "log.h"
47 47
48int
49kex_ecdh_name_to_nid(const char *kexname)
50{
51 if (strlen(kexname) < sizeof(KEX_ECDH_SHA2_STEM) - 1)
52 fatal("%s: kexname too short \"%s\"", __func__, kexname);
53 return key_curve_name_to_nid(kexname + sizeof(KEX_ECDH_SHA2_STEM) - 1);
54}
55
56const EVP_MD *
57kex_ecdh_name_to_evpmd(const char *kexname)
58{
59 int nid = kex_ecdh_name_to_nid(kexname);
60
61 if (nid == -1)
62 fatal("%s: unsupported ECDH curve \"%s\"", __func__, kexname);
63 return key_ec_nid_to_evpmd(nid);
64}
65
66void 48void
67kex_ecdh_hash( 49kex_ecdh_hash(
68 const EVP_MD *evp_md, 50 const EVP_MD *evp_md,