aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_crypto.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-06-06 10:45:23 -0400
committerNick Mathewson <nickm@torproject.org>2016-06-06 10:45:23 -0400
commit1e330e1947b750be12b217c944534f9284509751 (patch)
treeddf93d0373383a4be584485560b883fd31ec757d /src/test/test_crypto.c
parentc19a3d1bf893b19d73b3a9038162c403817034ac (diff)
downloadtor-1e330e1947b750be12b217c944534f9284509751.tar.gz
tor-1e330e1947b750be12b217c944534f9284509751.zip
Repair test_crypto_openssl_version with LibreSSL
Diffstat (limited to 'src/test/test_crypto.c')
-rw-r--r--src/test/test_crypto.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c
index d3e12b69b7..0e82223786 100644
--- a/src/test/test_crypto.c
+++ b/src/test/test_crypto.c
@@ -156,12 +156,13 @@ test_crypto_openssl_version(void *arg)
(void)arg;
const char *version = crypto_openssl_get_version_str();
const char *h_version = crypto_openssl_get_header_version_str();
-
tt_assert(version);
tt_assert(h_version);
tt_assert(!strcmpstart(version, h_version)); /* "-fips" suffix, etc */
tt_assert(!strstr(version, "OpenSSL"));
int a=-1,b=-1,c=-1;
+ if (!strcmpstart(version, "LibreSSL") || !strcmpstart(version, "BoringSSL"))
+ return;
int r = tor_sscanf(version, "%d.%d.%d", &a,&b,&c);
tt_int_op(r, OP_EQ, 3);
tt_int_op(a, OP_GE, 0);