diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-02-07 17:36:11 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-02-07 17:36:11 -0500 |
commit | 9bb34aa897e4ecac27a6f8d50a659803f73c6cb9 (patch) | |
tree | 21834c326960ffdfe7b6bf198503a163da777ebc /src/test/bench.c | |
parent | a7e946596d6da9aca80456141b7fddbc198c217c (diff) | |
download | tor-9bb34aa897e4ecac27a6f8d50a659803f73c6cb9.tar.gz tor-9bb34aa897e4ecac27a6f8d50a659803f73c6cb9.zip |
Survive fedora's openssl in our benchmarks
Apparently fedora currently has ECDH but not P224. This isn't a huge
deal, since we no longer use OpenSSL's P224 ever (see #9780 and
72c1e5acfe1c6). But we shouldn't have segfaulting benchmarks really.
Fixes bug 10835; bugfix on 0.2.4.8-alpha.
Diffstat (limited to 'src/test/bench.c')
-rw-r--r-- | src/test/bench.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/bench.c b/src/test/bench.c index 5a8d21d173..706b8bc7fb 100644 --- a/src/test/bench.c +++ b/src/test/bench.c @@ -440,6 +440,10 @@ bench_ecdh_impl(int nid, const char *name) ssize_t slen_a, slen_b; EC_KEY *dh_a = EC_KEY_new_by_curve_name(nid); EC_KEY *dh_b = EC_KEY_new_by_curve_name(nid); + if (!dh_a || !dh_b) { + puts("Skipping. (No implementation?)"); + return; + } EC_KEY_generate_key(dh_a); EC_KEY_generate_key(dh_b); |