diff options
author | Colin Watson <cjwatson@debian.org> | 2013-09-14 15:43:03 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2013-09-14 15:43:03 +0100 |
commit | 8faf8c84430cf3c19705b1d9f8889d256e7fd1fd (patch) | |
tree | e6cb74192adb00fda5e4d1457547851d7e0d86af /kexecdh.c | |
parent | 328b60656f29db6306994d7498dede386ec2d1c3 (diff) | |
parent | c41345ad7ee5a22689e2c009595e85fa27b4b39a (diff) |
merge 6.3p1
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, |