]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
When detecting OpenSSL, look for 1.0.1, and in homebrew location
authorNick Mathewson <nickm@torproject.org>
Wed, 20 Sep 2017 19:54:36 +0000 (15:54 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 20 Sep 2017 20:07:19 +0000 (16:07 -0400)
Previously we would detect the system openssl on OSX, and then fail
to use it, since we required Open 1.0.1 or later.  That's silly!

Instead of looking for RAND_add(), look for TLSv1_1_method(): it was
introduced in 1.0.1, and is also present in LibreSSL.

Also, add the hombebrew path to our search path here.

Fixes bug 23602; bugfix on 0.2.7.2-alpha.

changes/ticket23602 [new file with mode: 0644]
configure.ac

diff --git a/changes/ticket23602 b/changes/ticket23602
new file mode 100644 (file)
index 0000000..c741f2b
--- /dev/null
@@ -0,0 +1,6 @@
+  o Minor bugfixes (build):
+    - When searching for OpenSSL, don't accept any OpenSSL library that lacks
+      TLSv1_1_method(): Tor doesn't build with those versions.  Additionally,
+      look in /usr/local/opt/openssl, if it's present.  These changes
+      together repair the default build on OSX systems with Homebrew
+      installed. Fixes bug 23602; bugfix on 0.2.7.2-alpha.
index 76140cbd19dafd6e39fafb80d8fc6bb180904221..eaa0cd2be69e2c714ddcf5b429d23185da5c1141 100644 (file)
@@ -612,11 +612,12 @@ AC_ARG_WITH(ssl-dir,
       fi
   ])
 
+AC_MSG_NOTICE([Now, we'll look for OpenSSL >= 1.0.1])
 TOR_SEARCH_LIBRARY(openssl, $tryssldir, [-lssl -lcrypto $TOR_LIB_GDI],
-    [#include <openssl/rand.h>],
-    [void RAND_add(const void *buf, int num, double entropy);],
-    [RAND_add((void*)0,0,0);], [],
-    [/usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/athena /opt/openssl])
+    [#include <openssl/ssl.h>],
+    [struct ssl_method_st; const struct ssl_method_st *TLSv1_1_method(void);],
+    [TLSv1_1_method();], [],
+    [/usr/local/opt/openssl /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/athena /opt/openssl])
 
 dnl XXXX check for OPENSSL_VERSION_NUMBER == SSLeay()