summaryrefslogtreecommitdiff
path: root/src/common/crypto_s2k.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-05-24 10:28:31 -0400
committerNick Mathewson <nickm@torproject.org>2016-05-24 10:31:02 -0400
commitbe3875cda2c45d8cd057c00e0bcc16bef9067d90 (patch)
tree1bf9ca9e9915ba60a2cb744ead1291f3a09a579f /src/common/crypto_s2k.c
parent87134db57cc7cbbd801e5992ce6ca6a71e2ebfc8 (diff)
downloadtor-be3875cda2c45d8cd057c00e0bcc16bef9067d90.tar.gz
tor-be3875cda2c45d8cd057c00e0bcc16bef9067d90.zip
Make sure that libscrypt_scrypt actually exists before using it.
Previously, if the header was present, we'd proceed even if the function wasn't there. Easy fix for bug 19161. A better fix would involve trying harder to find libscrypt_scrypt.
Diffstat (limited to 'src/common/crypto_s2k.c')
-rw-r--r--src/common/crypto_s2k.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/crypto_s2k.c b/src/common/crypto_s2k.c
index a9140c7553..3bc05f1cf9 100644
--- a/src/common/crypto_s2k.c
+++ b/src/common/crypto_s2k.c
@@ -19,7 +19,7 @@
#include <openssl/evp.h>
-#ifdef HAVE_LIBSCRYPT_H
+#if defined(HAVE_LIBSCRYPT_H) && defined(HAVE_LIBSCRYPT_SCRYPT)
#define HAVE_SCRYPT
#include <libscrypt.h>
#endif