On Wed, Jun 25, 2014 at 10:59 PM, Niels Möller <[email protected]> wrote: > I've done this a bit differently, but I've now pushed an > --enable-mini-gmp option on the master branch. Testing appreciated.
I haven't tested with gnutls, as I still need to convert it to use the new API, but a small patch is attached which makes hogweed-benchmark to run on Fedora and RHEL (that don't include the SECP-224 and 192 curves). regards, Nikos
From 8e7cc18058a7525ed2d9310455d5576ffa780138 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos <[email protected]> Date: Thu, 26 Jun 2014 16:56:08 +0200 Subject: [PATCH] hogweed-benchmark: do not abort() if an openssl algorithm isn't available --- examples/hogweed-benchmark.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/hogweed-benchmark.c b/examples/hogweed-benchmark.c index 311fa2d..b9dca3d 100644 --- a/examples/hogweed-benchmark.c +++ b/examples/hogweed-benchmark.c @@ -146,6 +146,11 @@ bench_alg (const struct alg *alg) void *ctx; ctx = alg->init(alg->size); + if (ctx == NULL) + { + printf("%15s %4d N/A\n", alg->name, alg->size); + return; + } sign = time_function (alg->sign, ctx); verify = time_function (alg->verify, ctx); @@ -604,7 +609,10 @@ bench_openssl_ecdsa_init (unsigned size) default: die ("Internal error.\n"); } - assert (ctx->key); + + /* This curve isn't supported in this build of openssl */ + if (ctx->key == NULL) + return NULL; if (!EC_KEY_generate_key( ctx->key)) die ("Openssl EC_KEY_generate_key failed.\n"); -- 1.9.3
_______________________________________________ nettle-bugs mailing list [email protected] http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs
