[tor-commits] [tor/release-0.3.1] Restore openssl and libscrypt includes in test_crypto_slow.c

nickm at torproject.org nickm at torproject.org
Wed Jul 12 13:24:09 UTC 2017


commit e111cfcd54662bd6cea86e7a970492b3b80bd723
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Jul 12 09:19:12 2017 -0400

    Restore openssl and libscrypt includes in test_crypto_slow.c
    
    This reverts part of commit 706c44a6ce0bbeee51c800521a3199d76e1dcd96.
    
    It was a mistake to remove these includes: they were needed on
    systems where we have openssl 1.1.0 *and* libscrypt, and where we
    were validating the one against the other.
    
    Fixes bug 22892; bugfix on 0.3.1.1-alpha.
---
 changes/bug22892            | 4 ++++
 src/test/test_crypto_slow.c | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/changes/bug22892 b/changes/bug22892
new file mode 100644
index 0000000..9a70cb0
--- /dev/null
+++ b/changes/bug22892
@@ -0,0 +1,4 @@
+  o Minor bugfixes (compilation):
+    - Compile correctly when both openssl 1.1.0 and libscrypt are detected.
+      Previously this would cause an error. Fixes bug 22892; bugfix on 
+      0.3.1.1-alpha.
diff --git a/src/test/test_crypto_slow.c b/src/test/test_crypto_slow.c
index d6b0a43..6d676ff 100644
--- a/src/test/test_crypto_slow.c
+++ b/src/test/test_crypto_slow.c
@@ -12,8 +12,11 @@
 
 #if defined(HAVE_LIBSCRYPT_H) && defined(HAVE_LIBSCRYPT_SCRYPT)
 #define HAVE_LIBSCRYPT
+#include <libscrypt.h>
 #endif
 
+#include <openssl/evp.h>
+
 /** Run unit tests for our secret-to-key passphrase hashing functionality. */
 static void
 test_crypto_s2k_rfc2440(void *arg)





More information about the tor-commits mailing list