summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-12-05 10:06:25 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-05 10:06:25 -0500
commit212d984dc50668adbbd770d4af9185ca8bcaefbf (patch)
tree30598b2780b9f6cde0fb5335b915677e0840711f
parent5b336f2e0b792b2927b1d3bdc521d81221c5e157 (diff)
parentcc34ba1cecc7733bf69a6fee9e6ecf2ac8661b7e (diff)
downloadtor-212d984dc50668adbbd770d4af9185ca8bcaefbf.tar.gz
tor-212d984dc50668adbbd770d4af9185ca8bcaefbf.zip
Merge branch 'maint-0.2.8' into release-0.2.8
-rw-r--r--changes/bug208657
-rw-r--r--src/common/crypto.c9
2 files changed, 16 insertions, 0 deletions
diff --git a/changes/bug20865 b/changes/bug20865
new file mode 100644
index 0000000000..575d886a3e
--- /dev/null
+++ b/changes/bug20865
@@ -0,0 +1,7 @@
+ o Minor bugfixes (portability):
+ - Avoid compilation errors when building on OSX Sierra. Sierra began
+ to support the getentropy() API, but created a few problems in
+ doing so. Tor 0.2.9 has a more thorough set of workarounds; in
+ 0.2.8, we are just using the /dev/urandom interface. Fixes
+ bug 20865. Bugfix on 0.2.8.1-alpha.
+
diff --git a/src/common/crypto.c b/src/common/crypto.c
index c5d07dfb61..f7bb8ff1f9 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -88,6 +88,15 @@
#include "keccak-tiny/keccak-tiny.h"
+#ifdef __APPLE__
+/* Apple messed up their getentropy definitions in Sierra. It's not insecure
+ * or anything (as far as I know) but it makes compatible builds hard. 0.2.9
+ * contains the necessary tricks to do it right: in 0.2.8, we're just using
+ * this blunt instrument.
+ */
+#undef HAVE_GETENTROPY
+#endif
+
#ifdef ANDROID
/* Android's OpenSSL seems to have removed all of its Engine support. */
#define DISABLE_ENGINES