diff options
Diffstat (limited to 'kexecdh.c')
-rw-r--r-- | kexecdh.c | 20 |
1 files changed, 1 insertions, 19 deletions
@@ -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 | ||
48 | int | ||
49 | kex_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 | |||
56 | const EVP_MD * | ||
57 | kex_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 | |||
66 | void | 48 | void |
67 | kex_ecdh_hash( | 49 | kex_ecdh_hash( |
68 | const EVP_MD *evp_md, | 50 | const EVP_MD *evp_md, |