diff --git a/changes/bug6673 b/changes/bug6673 new file mode 100644 index 0000000000000000000000000000000000000000..506b449892f679a43204ce8d2be06b8cf522b9ed --- /dev/null +++ b/changes/bug6673 @@ -0,0 +1,4 @@ + o Minor features (build): + - Detect and reject attempts to build Tor with threading support + when OpenSSL have been compiled with threading support disabled. + Fixes bug 6673. diff --git a/src/common/crypto.c b/src/common/crypto.c index cfa11cbaa8b3ff54c2d752e2812c7a90c9361919..949fd52eb22c4ff5970fa0e3ec20b83573645256 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -2983,6 +2983,12 @@ memwipe(void *mem, uint8_t byte, size_t sz) } #ifdef TOR_IS_MULTITHREADED + +#ifndef OPENSSL_THREADS +#error OpenSSL has been built without thread support. Tor requires an \ + OpenSSL library with thread support enabled. +#endif + /** Helper: OpenSSL uses this callback to manipulate mutexes. */ static void openssl_locking_cb_(int mode, int n, const char *file, int line)