[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/maint-0.2.4] Survive fedora's openssl in our benchmarks



commit 9bb34aa897e4ecac27a6f8d50a659803f73c6cb9
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Feb 7 17:36:11 2014 -0500

    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.
---
 changes/bug10835 |    4 ++++
 src/test/bench.c |    4 ++++
 2 files changed, 8 insertions(+)

diff --git a/changes/bug10835 b/changes/bug10835
new file mode 100644
index 0000000..9df7bdd
--- /dev/null
+++ b/changes/bug10835
@@ -0,0 +1,4 @@
+  o Minor bugfixes (testing):
+    - Fix a segmentation fault in our benchmark code when running with
+      Fedora's OpenSSL package, or any other OpenSSL that provides
+      ECDH but not P224. Fixes bug 10835; bugfix on 0.2.4.8-alpha.
diff --git a/src/test/bench.c b/src/test/bench.c
index 5a8d21d..706b8bc 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);

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits