summaryrefslogtreecommitdiffstats
path: root/apps/speed.c
diff options
context:
space:
mode:
authorNicola Tuveri <nic.tuv@gmail.com>2016-10-04 14:56:49 +0200
committerRich Salz <rsalz@openssl.org>2016-11-17 06:36:23 +0100
commitdb1dd9368a153d6eac2256f86936207f9d777b32 (patch)
tree6d34daa8194be697d8a157b979a25c777faf2a76 /apps/speed.c
parentMore coding style fixes (diff)
downloadopenssl-db1dd9368a153d6eac2256f86936207f9d777b32.tar.xz
openssl-db1dd9368a153d6eac2256f86936207f9d777b32.zip
Remove ECDH_EVP_derive_key wrapper function
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1658)
Diffstat (limited to 'apps/speed.c')
-rw-r--r--apps/speed.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/apps/speed.c b/apps/speed.c
index 2bd29c92ae..5a1d92b43c 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -1031,18 +1031,6 @@ static int ECDSA_verify_loop(void *args)
/* ******************************************************************** */
static long ecdh_c[EC_NUM][1];
-static int ECDH_EVP_derive_key(unsigned char *derived_secret,
- size_t *outlen, EVP_PKEY_CTX *ctx)
-{
- int rt = 1;
- if ((rt = EVP_PKEY_derive(ctx, derived_secret, outlen)) <= 0) {
- BIO_printf(bio_err, "ECDH EVP_PKEY_derive failure: returned %d\n", rt);
- ERR_print_errors(bio_err);
- return rt;
- }
- return rt;
-}
-
static int ECDH_EVP_derive_key_loop(void *args)
{
loopargs_t *tempargs = *(loopargs_t **) args;
@@ -1051,10 +1039,12 @@ static int ECDH_EVP_derive_key_loop(void *args)
int count;
size_t *outlen = &(tempargs->outlen[testnum]);
- for (count = 0; COND(ecdh_c[testnum][0]); count++) {
- if (!ECDH_EVP_derive_key(derived_secret, outlen, ctx))
+ for (count = 0; COND(ecdh_c[testnum][0]); count++)
+ if (EVP_PKEY_derive(ctx, derived_secret, outlen) <= 0) {
+ BIO_printf(bio_err, "ECDH EVP_PKEY_derive failure\n");
+ ERR_print_errors(bio_err);
break;
- }
+ }
return count;
}